pid /tmp/nginx.pid; worker_processes 2; error_log /dev/stderr warn; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /dev/stdout; sendfile on; resolver 127.0.0.11 valid=10s ipv6=off; resolver_timeout 3s; limit_req_zone $binary_remote_addr zone=cmvr_login:1m rate=10r/m; limit_req_status 429; server_tokens off; client_body_temp_path /tmp/client_temp; proxy_temp_path /tmp/proxy_temp; fastcgi_temp_path /tmp/fastcgi_temp; uwsgi_temp_path /tmp/uwsgi_temp; scgi_temp_path /tmp/scgi_temp; server { listen 8080; server_name _; root /usr/share/nginx/html; index index.html; client_max_body_size 512m; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy same-origin always; add_header X-Frame-Options SAMEORIGIN always; add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; media-src 'self' blob:; connect-src 'self'; font-src 'self' data:; frame-ancestors 'self'; object-src 'none'; base-uri 'self'" always; location = /api/auth/login { limit_req zone=cmvr_login burst=20 nodelay; include /etc/nginx/api-proxy.conf; } location /api/ { include /etc/nginx/api-proxy.conf; } # The library SPA route shares the build directory's name. Serve the # entry point explicitly so Nginx cannot redirect it to container :8080. location = /assets { try_files /index.html =404; expires -1; } location = /assets/ { try_files /index.html =404; expires -1; } location /assets/ { try_files $uri =404; expires 7d; } location = /index.html { try_files $uri =404; expires -1; } location / { try_files $uri $uri/ /index.html; } } }