Skip to content

Commit ef3d208

Browse files
committed
Add various missed but OK CSP cases
Still working on moving beyond just reporting here - but for now this looks likely to be a good start (hopefully - still not enabling 100% though).
1 parent b6bcd76 commit ef3d208

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

automation/webpack.prod.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,22 @@ export default merge(common, {
134134
'default-src': "'none'",
135135
'object-src': "'none'",
136136
'frame-ancestors': "'none'",
137-
'img-src': ["'self'", 'https://httptoolkit.com', 'data:'],
137+
'img-src': [
138+
"'self'", 'data:', 'https://httptoolkit.com', 'https://secure.gravatar.com'
139+
],
138140
'font-src': ["'self'"],
139141
'style-src': ["'report-sample'", "'self'", "'unsafe-inline'"],
142+
'frame-src': "https://login.httptoolkit.tech",
140143
'script-src': [
141144
"'report-sample'",
142145
"'unsafe-eval'", // For both wasm & real eval() uses
143-
"'self'", 'https://cdn.auth0.com/', 'https://cdn.eu.auth0.com/'
146+
"'self'",
147+
'https://cdn.auth0.com/', 'https://cdn.eu.auth0.com/', 'https://secure.gravatar.com'
144148
],
145149
'connect-src': [
146-
"'self'", 'http://127.0.0.1:45456', 'http://127.0.0.1:45457', 'ws://127.0.0.1:45456', 'https://*.httptoolkit.tech', 'https://sentry.io', 'data:'
150+
"'self'", 'data:',
151+
'http://127.0.0.1:45456', 'http://127.0.0.1:45457', 'ws://127.0.0.1:45456',
152+
'https://*.httptoolkit.tech', 'https://*.sentry.io'
147153
],
148154
'report-uri': CSP_REPORT_URL,
149155
'report-to': 'csp-endpoint'

0 commit comments

Comments
 (0)