We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff6eb03 commit ce8233bCopy full SHA for ce8233b
templates/common.filter.template
@@ -1,4 +1,4 @@
1
# Allow load ab2p resources from sites with CSP policies applied
2
SERVER-HEADER-FILTER: allow-custom-css "Add ${NGINX_SERVER_NAME} to style-src in CSP"
3
-s/(style-src\s+)([^;]*)(;)/$1$2 ${NGINX_SERVER_NAME}$3/gmi
4
-s/^Content-Security-Policy:\s+(?!.*style-src)(.*)$/Content-Security-Policy: $1; style-src ${NGINX_SERVER_NAME}/mi
+s/(style-src\s+)(?![^;]*${NGINX_SERVER_NAME})([^;]*)(;)/$1$2 ${NGINX_SERVER_NAME}$3/gmi
+s/^Content-Security-Policy:\s+(?!.*style-src)(.*?)(default-src\s+)(?![^;]*${NGINX_SERVER_NAME})([^;]*)(;)/Content-Security-Policy: $1$2$3 ${NGINX_SERVER_NAME}$4/mi
0 commit comments