feat(server): adds content-security-policy header to server endpoints (#2500)
This commit is contained in:
@@ -334,6 +334,16 @@ export async function init() {
|
||||
app.use(errorLoggingMiddleware)
|
||||
app.use(authContextMiddleware)
|
||||
app.use(createRateLimiterMiddleware())
|
||||
app.use(
|
||||
async (
|
||||
_req: express.Request,
|
||||
res: express.Response,
|
||||
next: express.NextFunction
|
||||
) => {
|
||||
res.setHeader('Content-Security-Policy', "frame-ancestors 'none'")
|
||||
next()
|
||||
}
|
||||
)
|
||||
app.use(mixpanelTrackerHelperMiddleware)
|
||||
|
||||
app.use(Sentry.Handlers.errorHandler())
|
||||
|
||||
Reference in New Issue
Block a user