Skip to content

Commit 180c962

Browse files
committed
Fix CSP to allow Material Icons fonts and BC Gov scripts
- Add fonts.gstatic.com to font-src for Material Icons - Add use.typekit.net to script-src and font-src for Adobe fonts - Add www2.gov.bc.ca to script-src for BC Gov analytics - Add fonts.googleapis.com to style-src for Google Fonts CSS - Add loginproxy.gov.bc.ca to connect-src for Keycloak
1 parent 7269330 commit 180c962

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openshift/templates/nginx-runtime/default.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ server {
1414
server_name localhost;
1515

1616
# Security headers
17-
add_header Content-Security-Policy "default-src 'self' https://*.gov.bc.ca; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' https://*.gov.bc.ca; frame-ancestors 'none';" always;
17+
# CSP allows: BC Gov resources, Google Fonts (Material Icons), Adobe Typekit, Keycloak
18+
add_header Content-Security-Policy "default-src 'self' https://*.gov.bc.ca; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www2.gov.bc.ca https://use.typekit.net; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: https:; font-src 'self' data: https://fonts.gstatic.com https://use.typekit.net; connect-src 'self' https://*.gov.bc.ca https://*.loginproxy.gov.bc.ca; frame-ancestors 'none';" always;
1819
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
1920
add_header X-Content-Type-Options "nosniff" always;
2021
add_header X-Frame-Options "DENY" always;

0 commit comments

Comments
 (0)