Skip to content

Commit

Permalink
Add more useful headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Feb 10, 2024
1 parent a78c934 commit 94ea9de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export function middleware (request) {
resp.headers.set('Content-Security-Policy', cspHeader)
// for browsers that don't support CSP
resp.headers.set('X-Frame-Options', 'DENY')
// more useful headers
resp.headers.set('X-Content-Type-Options', 'nosniff')
resp.headers.set('Referrer-Policy', 'origin-when-cross-origin')

return resp
}
Expand Down

0 comments on commit 94ea9de

Please sign in to comment.