Update nginx v0.7.2

This commit is contained in:
oufmilo 2024-01-19 13:38:18 +01:00
parent fcecbf5437
commit dcb385da82

View file

@ -1,12 +1,26 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ { location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/; proxy_pass http://127.0.0.1:__PORT__/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_redirect off; proxy_redirect off;
} }
# directly serve images and static files from the
# bookwyrm filesystem using sendfile.
# make the logs quieter by not reporting these requests
location ~ \.(bmp|ico|jpg|jpeg|png|tif|tiff|webp|css|js)$ {
root __INSTALL_DIR__;
try_files $uri =404;
add_header X-Cache-Status STATIC;
access_log off;
}
# block access to any non-image files from images or static
location ~ ^/images/ {
return 403;
}
location /images/ { location /images/ {
alias __INSTALL_DIR__/images/; alias __INSTALL_DIR__/images/;
} }