web,prosody: add XMPP WebSocket / Stream Management support
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
130eb551a7
commit
d747bfbe6b
@@ -1,3 +1,5 @@
|
||||
{{ $ENABLE_XMPP_WEBSOCKET := .Env.ENABLE_XMPP_WEBSOCKET | default "0" | toBool }}
|
||||
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 0;
|
||||
@@ -50,6 +52,21 @@ location = /http-bind {
|
||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||
}
|
||||
|
||||
{{ if $ENABLE_XMPP_WEBSOCKET }}
|
||||
# xmpp websockets
|
||||
location = /xmpp-websocket {
|
||||
proxy_pass {{ .Env.XMPP_BOSH_URL_BASE }}/xmpp-websocket;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
|
||||
proxy_set_header Host {{ .Env.XMPP_DOMAIN }};
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
tcp_nodelay on;
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
location ~ ^/([^/?&:'"]+)$ {
|
||||
try_files $uri @root_path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user