Skip to content

Commit f4e540f

Browse files
Merge pull request #6586 from topcoder-platform/veterans-http-headers
remove unsafe-inline csp for veterans
2 parents 207111f + 11617bc commit f4e540f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ workflows:
357357
context : org-global
358358
filters:
359359
branches:
360-
only:
361-
- tco23
360+
only:
361+
- free
362362
# This is alternate dev env for parallel testing
363363
- "build-qa":
364364
context : org-global

src/server/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,11 @@ async function onExpressJsSetup(server) {
138138
res.header('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
139139

140140
if (req.url.startsWith('/__community__/veterans') || req.hostname === 'veterans.topcoder.com' || req.url.startsWith('/__community__/tco') || tcoPattern.test(req.hostname)) {
141+
res.header('Cache-Control', 'no-cache');
141142
res.header(
142143
'Content-Security-Policy',
143144
"default-src 'self';"
144-
+ " script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval'"
145+
+ " script-src 'report-sample' 'self'"
145146
+ ` ${config.CDN.PUBLIC}`
146147
+ ' http://www.google-analytics.com'
147148
+ ' https://www.google-analytics.com'

0 commit comments

Comments
 (0)