From 9abb75e2094eb1fb7859825c8385634bdf943c76 Mon Sep 17 00:00:00 2001 From: amedvede Date: Tue, 16 Jan 2024 13:57:23 +0100 Subject: [PATCH] bodhi: cors policy for dist-git stg domain Signed-off-by: amedvede --- roles/bodhi2/base/templates/production.ini.j2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2 index 81dcddbe2b..ff8928128b 100644 --- a/roles/bodhi2/base/templates/production.ini.j2 +++ b/roles/bodhi2/base/templates/production.ini.j2 @@ -697,10 +697,22 @@ pyramid.default_locale_name = en pyramid.includes = pyramid_sawing + cornice pyramid_sawing.file = /etc/bodhi/logging.yaml debugtoolbar.hosts = 127.0.0.1 ::1 +## +## CORS settings +## +{% if env == "staging" %} +cors.policy.origins = https://src.stg.fedoraproject.org +cors.policy.headers = Content-Type, Accept +cors.policy.expose_headers = Content-Type, Accept +cors.policy.methods = GET, OPTIONS +cors.policy.max_age = 3600 +{% endif %} + ## ## Database ##