summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-06-22 08:31:15 -0400
committerDessalines <tyhou13@gmx.com>2020-06-22 08:31:15 -0400
commitcb128256ed9b5779d696d3de599ef94bfe79a2e6 (patch)
tree349b86c3304946c9bf0fc94a135414799c537094 /ansible
parent9f504329991c8076dde48fa0fbc5b75192bb4e42 (diff)
Updating nginx.conf, upgrading pict-rs
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/ {