mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
distgit: added CSP headers for staging
Signed-off-by: amedvede <amedvede@redhat.com>
This commit is contained in:
@@ -300,6 +300,18 @@ ADMIN_API_ACLS = [
|
||||
|
||||
PROJECT_NAME_REGEX = '^[a-zA-z0-9_][a-zA-Z0-9-_\.+]*$'
|
||||
|
||||
|
||||
{% if env == 'staging' %}
|
||||
CSP_HEADERS = (
|
||||
"default-src 'self'; "
|
||||
"script-src 'self' '{nonce_script}' https://apps.stg.fedoraproject.org https://mdapi.stg.fedoraproject.org https://transtats.stg.fedoraproject.org; "
|
||||
"style-src 'self' '{nonce_style}'; "
|
||||
"object-src 'none'; "
|
||||
"base-uri 'self'; "
|
||||
"img-src 'self' https:; "
|
||||
"connect-src 'self' https://pdc.stg.fedoraproject.org https://apps.stg.fedoraproject.org https://mdapi.stg.fedoraproject.org https://transtats.stg.fedoraproject.org https://bodhi.stg.fedoraproject.org;"
|
||||
)
|
||||
{% else %}
|
||||
CSP_HEADERS = (
|
||||
"default-src 'self'; "
|
||||
"script-src 'self' '{nonce_script}' https://apps.fedoraproject.org https://mdapi.fedoraproject.org https://transtats.fedoraproject.org; "
|
||||
@@ -309,5 +321,6 @@ CSP_HEADERS = (
|
||||
"img-src 'self' https:; "
|
||||
"connect-src 'self' https://pdc.fedoraproject.org https://apps.fedoraproject.org https://mdapi.fedoraproject.org https://transtats.fedoraproject.org https://bodhi.fedoraproject.org;"
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
{% include "pagure_shared.cfg" %}
|
||||
|
||||
Reference in New Issue
Block a user