home-assistant-addons/snapcast/data/nginx-site.gtpl

40 lines
957 B
Text
Raw Permalink Normal View History

2023-08-08 17:29:03 +00:00
server {
listen {{ .interface }}:8099 default_server;
allow 172.30.32.2;
deny all;
absolute_redirect off;
location /mobile/ {
if ($request_uri ~ ^([^.\?]*[^/])$) {
return 301 {{ .entry }}$1/;
}
proxy_pass http://localhost:6680;
sub_filter_once off;
sub_filter_types *;
sub_filter '/mobile/' '{{ .entry }}/mobile/';
sub_filter '/mopidy/ws' '{{ .entry }}/mopidy/ws';
}
location /mopidy/ws {
proxy_pass http://localhost:6680;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
}
location / {
proxy_pass http://localhost:1780;
}
location ~ ^/(jsonrpc|stream) {
proxy_pass http://localhost:1780;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
}
}