diff --git a/compose.dev.yml b/compose.dev.yml index f57cef0d..b13f373c 100644 --- a/compose.dev.yml +++ b/compose.dev.yml @@ -2,7 +2,6 @@ services: web: volumes: - ./web/html:/var/www/playground - - ./web/nginx.conf:/etc/nginx/nginx.conf frontend: volumes: - ./frontend:/app diff --git a/web/nginx.conf b/web/nginx.conf index 58835de3..eccba0d8 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -12,9 +12,25 @@ http { } location / { proxy_pass http://frontend:3000; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + 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 $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; } location /api { proxy_pass http://backend:3000; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + 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 $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; } } }