Handle spaces in labels (#3679)

* Unquote label in flask routes
Encode label in Camera.jsx

* Don't use preprocessor

* Update nginx location for cacheable images
This commit is contained in:
uvjustin
2022-08-25 20:32:30 +08:00
committed by GitHub
parent 0d6dd1ed0f
commit 8c45dab9b8
3 changed files with 22 additions and 18 deletions

View File

@@ -172,10 +172,11 @@ http {
proxy_set_header Host $host;
}
location ~* /api/(.*\.(jpg|jpeg|png)$) {
location ~* /api/.*\.(jpg|jpeg|png)$ {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
proxy_pass http://frigate_api/$1$is_args$args;
rewrite ^/api/(.*)$ $1 break;
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;