Files
crank/apps/ui/nginx.conf
T
bsodfather e93de7015a
CI / Rust Checks (pull_request) Failing after 1s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
feat(import): complete OpenAPI onboarding and verify delivery
2026-10-09 17:50:38 +03:00

141 lines
3.5 KiB
Nginx Configuration File

server {
listen 3000;
server_name _;
absolute_redirect off;
root /usr/share/nginx/html;
index index.html;
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=(), usb=()" always;
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data: blob:; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'; form-action 'self'" always;
location = / {
try_files /index.html =404;
}
location = /index.html {
return 302 /;
}
location ~ ^/api/admin/workspaces/[^/]+/imports/openapi/[^/]+/plans$ {
client_max_body_size 16m;
proxy_pass http://admin-api:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 http://admin-api:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 /mcp/ {
proxy_pass http://mcp-server:3002/;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 = /login {
try_files /html/login.html =404;
}
location = /agents {
try_files /html/agents.html =404;
}
location = /api-keys {
try_files /html/api-keys.html =404;
}
location = /secrets {
try_files /html/secrets.html =404;
}
location = /logs {
try_files /html/logs.html =404;
}
location = /usage {
try_files /html/usage.html =404;
}
location = /settings {
try_files /html/settings.html =404;
}
location = /workspace-setup {
try_files /html/workspace-setup.html =404;
}
location = /wizard {
return 302 /wizard/;
}
location = /wizard/ {
try_files /html/wizard/index.html =404;
}
location ~ ^/wizard/(.+)$ {
rewrite ^/wizard/(.+)$ /html/wizard/$1 break;
try_files $uri =404;
}
location = /html/login.html {
return 302 /login;
}
location = /html/agents.html {
return 302 /agents;
}
location = /html/api-keys.html {
return 302 /api-keys;
}
location = /html/secrets.html {
return 302 /secrets;
}
location = /html/logs.html {
return 302 /logs;
}
location = /html/usage.html {
return 302 /usage;
}
location = /html/settings.html {
return 302 /settings;
}
location = /html/workspace-setup.html {
return 302 /workspace-setup$is_args$args;
}
location = /html/wizard/ {
return 302 /wizard/$is_args$args;
}
location = /html/wizard/index.html {
return 302 /wizard/;
}
location / {
try_files $uri $uri/ /index.html;
}
}