# nginx config for docs-frontend that injects the brand theme CSS at serve time.
# sub_filter injects the theme.css link before so Cunningham CSS variables
# are overridden at runtime without rebuilding the app.
# gzip must be off for sub_filter to work on HTML responses.
apiVersion: v1
kind: ConfigMap
metadata:
name: docs-frontend-nginx-conf
namespace: lasuite
data:
default.conf: |
server {
listen 8080;
listen 3000;
server_name localhost;
root /app;
gzip off;
sub_filter '' '';
sub_filter_once off;
sub_filter_types text/html;
location / {
try_files $uri index.html $uri/index.html =404;
add_header X-Frame-Options DENY always;
}
location ~ "^/docs/[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/?$" {
try_files $uri /docs/[id]/index.html;
add_header X-Frame-Options DENY always;
}
error_page 404 /404.html;
location = /404.html {
internal;
}
}