From d5bab6cc8a05893db8d54ce624a6e8bb4c7f67d8 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Fri, 9 Feb 2018 13:23:10 +0000 Subject: [PATCH] Correct the CORS setting for staging Bodhi. Signed-off-by: Randy Barlow --- roles/bodhi2/base/templates/production.ini.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index e500a51b75..bc42f0a9e0 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -555,7 +555,11 @@ cors_origins_ro = * # This should be more locked down to avoid cross-site request forgery. cors_origins_rw = https://bodhi{{env_suffix}}.fedoraproject.org -cors_connect_src = https://*.{{env_suffix}}fedoraproject.org/ wss://hub.{{env_suffix}}fedoraproject.org:9939/ +{% if env == 'production' %} +cors_connect_src = https://*.fedoraproject.org/ wss://hub.fedoraproject.org:9939/ +{% elif env == 'staging' %} +cors_connect_src = https://*.stg.fedoraproject.org/ wss://hub.stg.fedoraproject.org:9939/ +{% endif %} ##