diff options
author | Dessalines <tyhou13@gmx.com> | 2019-09-07 20:42:01 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-09-07 20:42:01 -0700 |
commit | c39ae06bd4bb553649a015f3d104440f1584402d (patch) | |
tree | a4fda6cd13d63019ff34966709106ba84d10870d /ansible | |
parent | b6ed1b81d022f03f3581c8acd02aeadb6d302497 (diff) |
Allow Image uploads through docker pictshare.
- Fixes #210
Diffstat (limited to 'ansible')
-rw-r--r-- | ansible/templates/nginx.conf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index e9fef181..ac4c3526 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -46,6 +46,9 @@ server { add_header X-Frame-Options "DENY"; add_header X-XSS-Protection "1; mode=block"; + # Upload limit for pictshare + client_max_body_size 50M; + location / { rewrite (\/(user|u\/|inbox|post|community|c\/|create_post|create_community|login|search|setup|sponsors|communities|modlog|home)+) /static/index.html break; proxy_pass http://0.0.0.0:8536; @@ -57,5 +60,12 @@ server { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; + } + + location /pictshare/ { + 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; } } |