Skip to content

Commit a5dd4b8

Browse files
committed
CSP update test for uni-nav
1 parent db3b482 commit a5dd4b8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

server.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,22 @@ function check () {
1717
}
1818
app.use(healthCheck.middleware([check]))
1919
app.use((req, res, next) => {
20-
res.header('Referrer-Policy', 'strict-origin-when-cross-origin');
21-
res.header('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
22-
res.header('X-Content-Type-Options', 'nosniff');
23-
res.header('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
24-
res.header('Cache-control', 'public, max-age=0');
25-
res.header('Pragma', 'no-cache');
26-
res.setHeader('X-Frame-Options', 'DENY');
20+
res.header('Referrer-Policy', 'strict-origin-when-cross-origin')
21+
res.header('Permissions-Policy', 'geolocation=(), microphone=(), camera=()')
22+
res.header('X-Content-Type-Options', 'nosniff')
23+
res.header('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload')
24+
res.header('Cache-control', 'public, max-age=0')
25+
res.header('Pragma', 'no-cache')
26+
res.setHeader('X-Frame-Options', 'DENY')
2727
res.setHeader('Content-Security-Policy',
28-
"frame-ancestors 'none';" +
28+
"frame-ancestors 'none';" +
2929
"script-src 'report-sample' 'self' 'unsafe-inline' 'unsafe-eval'" +
3030
' https://uni-nav.topcoder-dev.com' +
3131
' https://uni-nav.topcoder.com'
32-
);
32+
)
3333

34-
next();
35-
});
34+
next()
35+
})
3636
// app.use(requireHTTPS) // removed because app servers don't handle https
3737
// app.use(express.static(__dirname))
3838
app.use(express.static(path.join(__dirname, 'build')))

0 commit comments

Comments
 (0)