summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'ansible')
-rw-r--r--ansible/templates/nginx.conf25
1 files changed, 11 insertions, 14 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf
index 6a1c13c1..bdf80bc5 100644
--- a/ansible/templates/nginx.conf
+++ b/ansible/templates/nginx.conf
@@ -71,23 +71,20 @@ server {
}
# Redirect pictshare images to pictrs
- rewrite ^(/pictshare/.*)$ /pictrs/image/$1;
+ location ~ /pictshare/(.*)$ {
+ return 301 /pictrs/image/$1;
+ }
# pict-rs images
- location /pictrs/image/ {
- proxy_pass http://0.0.0.0:8537/;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
- # Block the import
- location /pictrs/import {
- return 403;
+ location /pictrs {
+ location /pictrs/image {
+ proxy_pass http://0.0.0.0:8537/image/;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
-
- if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) {
- add_header Cache-Control "public, max-age=31536000, immutable";
- }
+ # Block the import
+ return 403;
}
location /iframely/ {