39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server{
|
|
listen $WEBSOCKET_PORT ssl;
|
|
listen [::]:$WEBSOCKET_PORT ssl;
|
|
ssl_certificate /etc/letsencrypt/live/$RADIO_HOST/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/$RADIO_HOST/privkey.pem;
|
|
|
|
location / {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://172.29.0.105:9000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 120s;
|
|
}
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name $RADIO_HOST;
|
|
ssl_certificate /etc/letsencrypt/live/$RADIO_HOST/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/$RADIO_HOST/privkey.pem;
|
|
|
|
location / {
|
|
client_max_body_size 0;
|
|
proxy_pass http://$ENDPOINT;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
}
|
|
|
|
|
|
}
|