2023-10-16 08:47:35 +00:00
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
|
|
|
default upgrade;
|
|
|
|
|
'' close;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
server{
|
|
|
|
|
listen $WEBSOCKET_PORT ssl;
|
2023-10-31 15:42:06 +00:00
|
|
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
|
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
2023-10-16 08:47:35 +00:00
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
proxy_set_header Host $host;
|
2023-10-31 15:42:06 +00:00
|
|
|
|
proxy_pass http://$NET$WEBSERVER:9000;
|
2023-10-16 08:47:35 +00:00
|
|
|
|
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 $JC_SERVICE;
|
2023-10-31 15:42:06 +00:00
|
|
|
|
ssl_certificate $JC_CERT/fullchain.pem;
|
|
|
|
|
ssl_certificate_key $JC_CERT/privkey.pem;
|
2023-10-16 08:47:35 +00:00
|
|
|
|
|
|
|
|
|
location / {
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
proxy_pass http://$ENDPOINT;
|
|
|
|
|
proxy_set_header Host 'soundbase.radiodemo.oma-radio.fr';
|
|
|
|
|
proxy_set_header X-Forwarded-Host $JC_SERVICE;
|
|
|
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
|
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
location /direct.ogg {
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
proxy_pass http://$NET$ICECAST:8000/direct.ogg;
|
|
|
|
|
}
|
|
|
|
|
location /direct.mp3 {
|
|
|
|
|
client_max_body_size 0;
|
|
|
|
|
proxy_pass http://$NET$ICECAST:8000/direct.mp3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# TODO open some stat route
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|