distgit: added CSP headers for staging
Signed-off-by: amedvede <amedvede@redhat.com>
This commit is contained in:
parent
58ef53004c
commit
e88add7dd1
1 changed files with 13 additions and 0 deletions
|
@ -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" %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue