worker_processes auto; pid /tmp/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; access_log /dev/stdout; error_log /dev/stderr warn; sendfile on; server_tokens off; client_max_body_size 70m; map $http_upgrade $connection_upgrade { default upgrade; '' close; } upstream real2sim_api { server real2sim-api.real2sim-poc.svc.cluster.local:18126; } server { listen 8080; return 308 https://$host$request_uri; } server { listen 8443 ssl; ssl_certificate /etc/real2sim/tls/tls.crt; ssl_certificate_key /etc/real2sim/tls/tls.key; ssl_protocols TLSv1.2 TLSv1.3; ssl_session_cache shared:TLS:10m; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy same-origin always; add_header X-Frame-Options SAMEORIGIN always; root /usr/share/nginx/html; index index.html; location = /api/events/tasks { proxy_pass http://real2sim_api; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_buffering off; proxy_cache off; proxy_read_timeout 1h; } location /api/ { proxy_pass http://real2sim_api; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_request_buffering off; proxy_read_timeout 7200s; } location /datasets/ { proxy_pass http://real2sim_api; proxy_set_header Host $host; } location /runs/ { proxy_pass http://real2sim_api; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_buffering off; proxy_read_timeout 7200s; } location ~ ^/static/.*\.(html|js|css)$ { try_files $uri =404; expires -1; add_header Cache-Control "no-store"; } location /static/ { try_files $uri =404; expires 1h; add_header Cache-Control "public, max-age=3600"; } location / { try_files $uri $uri/ /index.html; add_header Cache-Control "no-store"; } } }