diff --git a/docker/config/nginx/motionui.conf b/docker/config/nginx/motionui.conf index cfa5502..68d8bc3 100644 --- a/docker/config/nginx/motionui.conf +++ b/docker/config/nginx/motionui.conf @@ -84,9 +84,9 @@ server { } # Go2rtc stream access - location ~ /api/stream.mjpeg { + location /api/stream.mjpeg { proxy_pass http://127.0.0.1:1984; - proxy_http_version 1.1; + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; @@ -94,8 +94,13 @@ server { } # Go2rtc main page - location ~ /go2rtc { - proxy_pass http://127.0.0.1:1984/; + location /go2rtc { + rewrite ^/go2rtc/?(.*)$ /$1 break; + proxy_pass http://127.0.0.1:1984; + 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; } location ~ \.php$ {