pagure: tune csp headers on stg

This commit is contained in:
Julen Landa Alustiza 2019-08-01 08:05:59 +02:00 committed by Pierre-Yves Chibon
parent 963ff9586b
commit f362dc6717

View file

@ -367,3 +367,17 @@ REPOSPANNER_REGIONS = {
GIT_AUTH_BACKEND = 'pagure'
HTTP_REPO_ACCESS_GITOLITE = None
{% if env == 'pagure-staging' %}
CSP_HEADERS = (
"default-src 'self';"
"script-src 'self' '{nonce_script}'; "
"style-src 'self' '{nonce_style}'; "
"object-src 'none';"
"base-uri 'self';"
"img-src 'self' https:;"
"connect-src 'self' https://stg.pagure.io:8088;"
"frame-src https://docs.stg.pagure.org;"
"frame-ancestors https://stg.pagure.io;"
)
{% endif %}