Add FedSockets config

This commit is contained in:
Mark Felder 2020-09-21 16:10:31 -05:00
parent 59680f27ff
commit 75f6e5e8b7

View file

@ -63,6 +63,7 @@ server {
# the nginx default is 1m, not enough for large media uploads # the nginx default is 1m, not enough for large media uploads
client_max_body_size 16m; client_max_body_size 16m;
ignore_invalid_headers off;
location / { location / {
proxy_http_version 1.1; proxy_http_version 1.1;
@ -91,4 +92,17 @@ server {
chunked_transfer_encoding on; chunked_transfer_encoding on;
proxy_pass http://127.0.0.1:4000; proxy_pass http://127.0.0.1:4000;
} }
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;
}
} }