summaryrefslogtreecommitdiff
path: root/templates/nginx/nginx.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/nginx/nginx.conf.j2')
-rw-r--r--templates/nginx/nginx.conf.j219
1 files changed, 18 insertions, 1 deletions
diff --git a/templates/nginx/nginx.conf.j2 b/templates/nginx/nginx.conf.j2
index 7f1ac2b..2e257e0 100644
--- a/templates/nginx/nginx.conf.j2
+++ b/templates/nginx/nginx.conf.j2
@@ -77,7 +77,7 @@ http {
}
location /stream {
- proxy_pass http://localhost:8000/stream;
+ proxy_pass http://127.0.0.1:8000/stream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -96,6 +96,23 @@ http {
add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
}
+ location /nowplaying {
+ proxy_pass http://127.0.0.1:8000/status-json.xsl;
+
+ 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;
+
+ proxy_http_version 1.1;
+ proxy_buffering off;
+ proxy_request_buffering off;
+
+ add_header Access-Control-Allow-Origin "*" always;
+ add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
+ add_header Access-Control-Allow-Headers "Content-Type" always;
+ }
+
location /admin {
deny all;
return 403;