summaryrefslogtreecommitdiff
path: root/installation
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-21 16:13:45 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-21 16:13:45 -0500
commitade7fede7134d0e05c91ef48d52e48e64fd6dd98 (patch)
tree460f55a852060c47b04d1a61a59bcef8a0d5e920 /installation
parent2b553b8f8e7cf01d8530b905c48b97b815098cd9 (diff)
Most proxy settings can be global
Diffstat (limited to 'installation')
-rw-r--r--installation/pleroma.nginx21
1 files changed, 6 insertions, 15 deletions
diff --git a/installation/pleroma.nginx b/installation/pleroma.nginx
index ce74f46e1..5517e3fc3 100644
--- a/installation/pleroma.nginx
+++ b/installation/pleroma.nginx
@@ -65,13 +65,13 @@ server {
client_max_body_size 16m;
ignore_invalid_headers off;
- location / {
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $http_host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ location / {
# this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
# and `localhost.` resolves to [::0] on some systems: see issue #930
proxy_pass http://127.0.0.1:4000;
@@ -82,7 +82,6 @@ server {
slice 1m;
proxy_cache_key $host$uri$is_args$args$slice_range;
proxy_set_header Range $slice_range;
- proxy_http_version 1.1;
proxy_cache_valid 200 206 301 304 1h;
proxy_cache_lock on;
proxy_ignore_client_abort on;
@@ -92,14 +91,6 @@ server {
}
location /api/fedsocket/v1 {
- proxy_http_version 1.1;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
-
- # The Important Websocket Bits!
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "Upgrade";
proxy_request_buffering off;
proxy_pass http://127.0.0.1:4000/api/fedsocket/v1;
}