diff --git a/docker/rootfs/usr/local/nginx/conf/nginx.conf b/docker/rootfs/usr/local/nginx/conf/nginx.conf index 881bbefdb..687b55bee 100644 --- a/docker/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/rootfs/usr/local/nginx/conf/nginx.conf @@ -44,6 +44,11 @@ http { keepalive 1024; } + upstream go2rtc_api { + server 127.0.0.1:1984; + keepalive 1024; + } + server { listen 5000; @@ -173,6 +178,14 @@ http { proxy_set_header Host $host; } + location /restream/ { + proxy_pass http://go2rtc_api/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + location ~* /api/.*\.(jpg|jpeg|png)$ { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';