Add restream to nginx

This commit is contained in:
Nick Mowen 2022-10-13 16:43:29 -06:00
parent 636a88e00e
commit 22c8828da8

View File

@ -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';