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; 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/ { proxy_pass http://cmvr-visual-api:8000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Connection ""; proxy_buffering off; proxy_cache off; proxy_request_buffering off; proxy_read_timeout 3600s; proxy_send_timeout 3600s; } # 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; } } }