diff --git a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf index 609b3d6ad..186b7037c 100644 --- a/docker/main/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/main/rootfs/usr/local/nginx/conf/nginx.conf @@ -222,16 +222,12 @@ http { include proxy.conf; } -# FIXME: Needed to disabled this rule, otherwise it fails for endpoints that end with one of those file extensions -# 1. with httptools it passes the auth.conf but then throws a 400 error "WARN "Invalid HTTP request received." -> https://github.com/encode/uvicorn/blob/47304d9ae76321f0f5f649ff4f73e09b17085933/uvicorn/protocols/http/httptools_impl.py#L165 -# 2. With h11 it goes through the auth.conf but returns a 404 error -# We might need to add extra rules that will allow endpoint that end with an extension OR find a fix without creating other rules -# location ~* /api/.*\.(jpg|jpeg|png|webp|gif)$ { -# include auth_request.conf; -# rewrite ^/api/(.*)$ $1 break; -# proxy_pass http://frigate_api; -# include proxy.conf; -# } + location ~* /api/.*\.(jpg|jpeg|png|webp|gif)$ { + include auth_request.conf; + rewrite ^/api/(.*)$ $1 break; + proxy_pass http://frigate_api; + include proxy.conf; + } location /api/ { include auth_request.conf;