mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
update nginx config
This commit is contained in:
parent
4d22e172ff
commit
cf0f8892e2
@ -18,12 +18,13 @@ http {
|
|||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
client_max_body_size 50M;
|
|
||||||
#tcp_nopush on;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
|
||||||
#gzip on;
|
upstream frigate_api {
|
||||||
|
server localhost:5000;
|
||||||
|
keepalive 1024;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@ -51,7 +52,7 @@ http {
|
|||||||
root /tmp;
|
root /tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /frigate/ {
|
location /clips/ {
|
||||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||||
add_header 'Access-Control-Allow-Credentials' 'true';
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||||
add_header 'Access-Control-Expose-Headers' 'Content-Length';
|
add_header 'Access-Control-Expose-Headers' 'Content-Length';
|
||||||
@ -69,7 +70,15 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
autoindex on;
|
autoindex on;
|
||||||
root /media;
|
root /media/frigate;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://frigate_api/;
|
||||||
|
proxy_pass_request_headers on;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user