From b4d42a83e5dd318254402a8f733ba53a15919fba Mon Sep 17 00:00:00 2001 From: maxlath Date: Thu, 27 Feb 2025 22:27:06 +0100 Subject: [PATCH] nginx: recover location @invimg --- nginx/templates/default.conf.template | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nginx/templates/default.conf.template b/nginx/templates/default.conf.template index da1c54c..17df5ff 100755 --- a/nginx/templates/default.conf.template +++ b/nginx/templates/default.conf.template @@ -91,6 +91,23 @@ server { } } + location ~ ^/img/ { + return 404; + } + + location @invimg { + include /etc/nginx/snippets/security_headers.conf; + default_type "image/jpeg"; + # add_header Content-Type "image/jpeg"; + add_header X-File-Cache "miss"; + add_header Content-Security-Policy "sandbox"; + proxy_temp_path /tmp/nginx/tmp; + proxy_store /tmp/nginx/resize/$uri; + proxy_store_access user:rw group:rw all:r; + proxy_http_version 1.1; + proxy_pass http://inv; + } + root /opt/inventaire/client; location /public { include /etc/nginx/snippets/security_headers.conf;