Files
cloudlink/nginx/nginx.conf
T
nmemmertandClaude Sonnet 4.6 d8568849b4
Build & Release / Docker / backend (push) Successful in 1m19s
Build & Release / Docker / frontend (push) Successful in 1m22s
Build & Release / Desktop / Linux & Windows (push) Successful in 16m58s
Build & Release / Deploy to server (push) Successful in 25s
Build & Release / Create release (push) Has been skipped
chore: switch nginx to HTTP-only for Cloudflare Flexible SSL
Cloudflare terminates TLS at the edge; origin only needs port 80.
Removes SSL cert requirement, drops port 443 from compose.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-31 08:46:17 -04:00

46 lines
1.4 KiB
Nginx Configuration File

events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 110m;
server {
listen 80;
# Security headers (Cloudflare handles TLS; these still apply)
add_header X-Frame-Options DENY always;
add_header X-Content-Type-Options nosniff always;
add_header Referrer-Policy no-referrer always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; connect-src 'self' wss: https:;" always;
# API
location /api/ {
proxy_pass http://backend:3001/api/;
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 $http_x_forwarded_proto;
}
# WebSocket
location /ws {
proxy_pass http://backend:3001/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400;
}
# Frontend (SPA)
location / {
proxy_pass http://frontend:80/;
proxy_set_header Host $host;
}
}
}