Files
aimaq-call-center/frontend.nginx.conf
T
arystanbekandClaude Sonnet 5 329127c0ac
deploy / deploy (push) Successful in 1m45s
fix(nginx): cache-control for index.html vs hashed assets
Prevents stale index.html referencing deleted asset hashes after
frontend redeploys (white screen / partial load until hard refresh).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-29 07:02:46 +00:00

88 lines
2.9 KiB
Plaintext

resolver 127.0.0.11 valid=30s ipv6=off;
resolver_timeout 5s;
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 50m;
location = /health {
set $api_gateway http://aimaq-call-center-app:8000;
proxy_pass $api_gateway/health;
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 /proxy/ {
set $api_gateway http://aimaq-call-center-app:8000;
proxy_pass $api_gateway;
proxy_http_version 1.1;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
proxy_connect_timeout 60s;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header Origin $http_origin;
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 = /voice-ai/operator-ws {
set $voice_ai_upstream_op http://aimaq-voice-ai:8099;
proxy_pass $voice_ai_upstream_op/operator-ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_buffering off;
}
location = /voice-ai/ws {
set $voice_ai_upstream http://aimaq-voice-ai:8099;
proxy_pass $voice_ai_upstream/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
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_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_buffering off;
}
location = /ws/supervisor/funnel {
set $platform_service http://platform-service:8000;
proxy_pass $platform_service/ws/supervisor/funnel$is_args$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
}
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable" always;
try_files $uri =404;
}
location / {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header Pragma "no-cache" always;
try_files $uri $uri/ /index.html;
}
}