| worker_processes auto; |
| error_log /dev/stderr warn; |
| pid /tmp/nginx.pid; |
|
|
| events { |
| worker_connections 1024; |
| } |
|
|
| http { |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
|
|
| log_format main '$remote_addr - [$time_local] "$request" $status $body_bytes_sent'; |
| access_log /dev/stdout main; |
|
|
| sendfile on; |
| tcp_nopush on; |
| keepalive_timeout 65; |
|
|
| |
| |
| gzip_static on; |
| gzip on; |
| gzip_comp_level 5; |
| gzip_min_length 1024; |
| gzip_vary on; |
| gzip_types application/json application/javascript text/css text/plain application/xml text/xml image/svg+xml; |
|
|
| |
| client_body_temp_path /tmp/nginx-client-body; |
| proxy_temp_path /tmp/nginx-proxy; |
| fastcgi_temp_path /tmp/nginx-fastcgi; |
| uwsgi_temp_path /tmp/nginx-uwsgi; |
| scgi_temp_path /tmp/nginx-scgi; |
|
|
| server { |
| listen 8080; |
| root /usr/share/nginx/html; |
| |
| |
| |
| index dashboard.html; |
|
|
| |
| location /assets/ { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "SAMEORIGIN" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header X-XSS-Protection "1; mode=block" always; |
| add_header Cache-Control "public, max-age=31536000, immutable"; |
| try_files $uri =404; |
| } |
|
|
| location /map-styles/ { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "SAMEORIGIN" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header X-XSS-Protection "1; mode=block" always; |
| add_header Cache-Control "public, max-age=31536000, immutable"; |
| try_files $uri =404; |
| } |
|
|
| location /data/ { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "SAMEORIGIN" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header X-XSS-Protection "1; mode=block" always; |
| add_header Cache-Control "public, max-age=31536000, immutable"; |
| try_files $uri =404; |
| } |
|
|
| location /textures/ { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "SAMEORIGIN" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header X-XSS-Protection "1; mode=block" always; |
| add_header Cache-Control "public, max-age=31536000, immutable"; |
| try_files $uri =404; |
| } |
|
|
| |
| |
| location = /embed { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header Cache-Control "private, no-cache, must-revalidate"; |
| add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), accelerometer=(), autoplay=(), bluetooth=(), display-capture=(), encrypted-media=(), gyroscope=(), hid=(), idle-detection=(), magnetometer=(), midi=(), payment=(), picture-in-picture=(), screen-wake-lock=(), serial=(), usb=(), xr-spatial-tracking=()" always; |
| add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https: wss: blob: data:; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self' blob:; font-src 'self' data: https:; media-src 'self' data: blob: https:; frame-src 'none'; frame-ancestors *; base-uri 'self'; object-src 'none'; form-action 'none'" always; |
| try_files /embed.html =404; |
| } |
|
|
| location = /embed.html { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header Cache-Control "private, no-cache, must-revalidate"; |
| add_header Permissions-Policy "camera=(), microphone=(), geolocation=(), accelerometer=(), autoplay=(), bluetooth=(), display-capture=(), encrypted-media=(), gyroscope=(), hid=(), idle-detection=(), magnetometer=(), midi=(), payment=(), picture-in-picture=(), screen-wake-lock=(), serial=(), usb=(), xr-spatial-tracking=()" always; |
| add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https: wss: blob: data:; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self' blob:; font-src 'self' data: https:; media-src 'self' data: blob: https:; frame-src 'none'; frame-ancestors *; base-uri 'self'; object-src 'none'; form-action 'none'" always; |
| try_files /embed.html =404; |
| } |
|
|
| |
| location /api/ { |
| proxy_pass http://127.0.0.1:${LOCAL_API_PORT}; |
| proxy_http_version 1.1; |
| proxy_set_header Host $host; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| |
| proxy_set_header Origin http://localhost; |
| |
| |
| |
| proxy_set_header X-WorldMonitor-Local-Token "${LOCAL_API_TOKEN}"; |
| proxy_read_timeout 120s; |
| proxy_send_timeout 120s; |
| } |
|
|
| |
| location / { |
| add_header X-Content-Type-Options "nosniff" always; |
| add_header X-Frame-Options "SAMEORIGIN" always; |
| add_header Referrer-Policy "strict-origin-when-cross-origin" always; |
| add_header X-XSS-Protection "1; mode=block" always; |
| |
| |
| |
| |
| |
| add_header Content-Security-Policy "default-src 'self'; connect-src 'self' https: wss: blob: data:; img-src 'self' data: blob: https:; style-src 'self' 'unsafe-inline'; script-src 'self' 'strict-dynamic' 'nonce-wm-static-bootstrap' 'sha256-+SFBjfmi2XfnyAT3POBxf6JIKYDcNXtllPclOcaNBI0=' 'sha256-HM+RrJX5JGDL7/DcrOAMaxeZongBUfrT4ufD58oheok=' 'sha256-7oZNrsyfSuHAVU4KcnfCYgflzMCUu6NcFnN8paFIf0A=' 'sha256-lKs3SvF31U/ZDoqILsGd1YpSh0LSw9Xlo0hNHcX8Wqk=' 'sha256-jivMHZyDzdNXiV/cLq8mQuk5ce+iG0c6K5voERlie2A=' 'sha256-8+wzVMOmlqUDa/kK12C8s5ulmSbmXZ1nd8SPraxR5w4=' 'sha256-qFSeUweakvZf90cHXTBJlSgrlZOixT+/ph7kpKeRYL0=' 'wasm-unsafe-eval'; worker-src 'self' blob:; font-src 'self' data:; media-src 'self' data: blob: https:; frame-src 'self' https://www.worldmonitor.app https://worldmonitor.app https://tech.worldmonitor.app https://finance.worldmonitor.app https://commodity.worldmonitor.app https://happy.worldmonitor.app https://energy.worldmonitor.app https://www.youtube.com https://www.youtube-nocookie.com https://www.google.com https://webcams.windy.com https://challenges.cloudflare.com https://*.clerk.accounts.dev https://clerk.worldmonitor.app https://vercel.live https://*.vercel.app https://*.dodopayments.com https://checkout.dodopayments.com https://test.checkout.dodopayments.com https://*.hs.dodopayments.com https://*.custom.hs.dodopayments.com https://pay.google.com https://hooks.stripe.com https://js.stripe.com; frame-ancestors 'self' https://www.worldmonitor.app https://tech.worldmonitor.app https://finance.worldmonitor.app https://commodity.worldmonitor.app https://happy.worldmonitor.app https://energy.worldmonitor.app https://worldmonitor.app; base-uri 'self'; object-src 'none'; form-action 'self' https://api.worldmonitor.app" always; |
| add_header Cache-Control "no-cache, no-store, must-revalidate"; |
| |
| add_header Permissions-Policy "storage-access=(self \"https://www.youtube.com\" \"https://youtube.com\")"; |
| try_files $uri $uri/ /dashboard.html; |
| } |
| } |
| } |
|
|