Files
anal-front/docker/nginx.conf.template
Aleksandr Meshchriakov 74b3cc4b91
Some checks failed
CI/CD Pipeline / Quality Gate (push) Failing after 3m46s
CI/CD Pipeline / Build and Deploy Dev via Compose (push) Has been skipped
Allow enterprise frontend iframe embedding
2026-06-23 17:54:42 +02:00

68 lines
2.0 KiB
Plaintext

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
proxy_ssl_server_name on;
send_timeout 300s;
proxy_hide_header X-Frame-Options;
proxy_hide_header Content-Security-Policy;
add_header Content-Security-Policy "frame-ancestors *" always;
location = /index.html {
add_header Content-Security-Policy "frame-ancestors *" always;
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files /index.html =404;
}
location ~* \.(?:js|mjs|css|png|jpg|jpeg|gif|svg|ico|webp|avif|woff2?|ttf|otf|map)$ {
add_header Content-Security-Policy "frame-ancestors *" always;
add_header Cache-Control "public, max-age=31536000, immutable" always;
try_files $uri =404;
}
location = /api {
proxy_pass ${BACKEND_UPSTREAM}/api;
proxy_set_header Host ${BACKEND_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/ {
proxy_pass ${BACKEND_UPSTREAM}/api/;
proxy_set_header Host ${BACKEND_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /health {
proxy_pass ${BACKEND_UPSTREAM}/health/;
proxy_set_header Host ${BACKEND_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /health/ {
proxy_pass ${BACKEND_UPSTREAM}/health/;
proxy_set_header Host ${BACKEND_HOST_HEADER};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
try_files $uri $uri/ /index.html;
}
}