forked from Deuxfleurs/infrastructure
Add CORS for our load testing frontend
This commit is contained in:
parent
5babe6fad1
commit
5fb05f0b7e
2 changed files with 6 additions and 2 deletions
|
@ -32,6 +32,10 @@ http {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /http-bind {
|
location /http-bind {
|
||||||
|
# We add CORS to use a different frontend which is useful for load testing as we do not want to advertise too much our URL
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'content-type';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT,DELETE,OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||||||
proxy_pass http://{{ env "NOMAD_ADDR_bosh_port" }}/http-bind;
|
proxy_pass http://{{ env "NOMAD_ADDR_bosh_port" }}/http-bind;
|
||||||
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 \$http_host;
|
||||||
|
|
|
@ -140,8 +140,8 @@ EOF
|
||||||
tags = [
|
tags = [
|
||||||
"jitsi",
|
"jitsi",
|
||||||
"traefik.enable=true",
|
"traefik.enable=true",
|
||||||
"traefik.frontend.entryPoints=https,http",
|
"traefik.frontend.entryPoints=https",
|
||||||
"traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/",
|
"traefik.frontend.rule=Host:jitsi.deuxfleurs.fr,visio.load-test.deuxfleurs.org;PathPrefix:/",
|
||||||
"traefik.protocol=https"
|
"traefik.protocol=https"
|
||||||
]
|
]
|
||||||
port = "https_port"
|
port = "https_port"
|
||||||
|
|
Loading…
Reference in a new issue