CORS for xmpp-websocket in multidomain setup
This commit is contained in:
parent
e242eda0f2
commit
61ddf629ac
|
@ -105,7 +105,7 @@ server {
|
||||||
proxy_pass http://prosody/room-info?prefix=$prefix&$args;
|
proxy_pass http://prosody/room-info?prefix=$prefix&$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host {{ domains | first }};
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ ^/_api/public/(.*)$ {
|
location ~ ^/_api/public/(.*)$ {
|
||||||
|
@ -130,17 +130,18 @@ server {
|
||||||
proxy_pass http://$prosody_node/http-bind?prefix=$prefix&$args;
|
proxy_pass http://$prosody_node/http-bind?prefix=$prefix&$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host {{ domains | first }};
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
}
|
}
|
||||||
|
|
||||||
# xmpp websockets
|
# xmpp websockets
|
||||||
location = /xmpp-websocket {
|
location = /xmpp-websocket {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
|
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host {{ domains | first }};
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,7 @@ server {
|
||||||
|
|
||||||
# xmpp websockets
|
# xmpp websockets
|
||||||
location = /xmpp-websocket {
|
location = /xmpp-websocket {
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
|
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|
Loading…
Reference in a new issue