Trying something dumb
This commit is contained in:
parent
b3489c8dea
commit
a373f322b5
20
nginx.conf
20
nginx.conf
|
@ -8,12 +8,6 @@ events {
|
|||
http {
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Maps for handling WebSocket connections
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
|
@ -30,19 +24,23 @@ http {
|
|||
}
|
||||
|
||||
location / {
|
||||
# Proxy pass to the backend using environment variables
|
||||
# Use the placeholders for the proxy pass
|
||||
proxy_pass ${PROTOCOL}://${BACKEND_ADDRESS}:${BACKEND_PORT};
|
||||
|
||||
# General proxy settings
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_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; # Inform the backend about the original protocol
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_buffering off;
|
||||
proxy_ssl_verify off; # Be cautious with this in a production environment
|
||||
proxy_ssl_verify off; # Skip SSL verification, be cautious
|
||||
|
||||
# Redirect HTTP to HTTPS
|
||||
if ($scheme != "https") {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue