This commit is contained in:
Tobias Reisinger 2023-08-08 19:29:03 +02:00
commit 39073d8f3a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
15 changed files with 297 additions and 0 deletions

View file

@ -0,0 +1,39 @@
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;
}
}