diff options
author | Dessalines <tyhou13@gmx.com> | 2020-06-12 17:05:19 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-06-12 17:05:19 -0400 |
commit | f647f2ae6cb187be08c6fd0f7daeb51e4093145a (patch) | |
tree | 5fb659c1880ef54307ca31e0c505c0fae94dde4d /ansible | |
parent | cddc23494d5fd0f8098524299980a6dcbcb3fca3 (diff) |
Blocking pict-rs import location
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/templates/nginx.conf | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 68fa64fc..6a5990a7 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -48,8 +48,8 @@ server { add_header X-Frame-Options "DENY"; add_header X-XSS-Protection "1; mode=block"; - # Upload limit for pictshare - client_max_body_size 50M; + # Upload limit for pictrs + client_max_body_size 20M; location / { proxy_pass http://0.0.0.0:8536; @@ -70,12 +70,17 @@ server { proxy_cache_min_uses 5; } - location /pictrs/ { + 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; + } + if ($request_uri ~ \.(?:ico|gif|jpe?g|png|webp|bmp|mp4)$) { add_header Cache-Control "public, max-age=31536000, immutable"; } |