CORS for xmpp-websocket in multidomain setup
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2849|6|2843|6|:-1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/jitsimeet/23//ansiblelint">Evolix » ansible-roles » jitsimeet #23</a>
gitea/ansible-roles/pipeline/head This commit looks good

This commit is contained in:
Mathieu Gauthier-Pilote 2024-01-25 14:23:27 -05:00
parent 5ac4f70bc7
commit d7a01faa2f
2 changed files with 5 additions and 3 deletions

View file

@ -105,7 +105,7 @@ server {
proxy_pass http://prosody/room-info?prefix=$prefix&$args;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Host {{ domains | first }};
}
location ~ ^/_api/public/(.*)$ {
@ -130,17 +130,18 @@ server {
proxy_pass http://$prosody_node/http-bind?prefix=$prefix&$args;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header Host {{ domains | first }};
proxy_set_header Connection "";
}
# xmpp websockets
location = /xmpp-websocket {
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
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 Host {{ domains | first }};
tcp_nodelay on;
}

View file

@ -153,6 +153,7 @@ server {
# xmpp websockets
location = /xmpp-websocket {
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://$prosody_node/xmpp-websocket?prefix=$prefix&$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;