mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
fix: ( x-frame ): add X-Frame-Options: DENY anti-clickjacking header
This commit is contained in:
@@ -85,6 +85,9 @@ export function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
response.headers.set('Content-Security-Policy', csp);
|
||||
// Anti-clickjacking. `frame-ancestors 'none'` (in the CSP above) is the modern control;
|
||||
// X-Frame-Options: DENY is the legacy equivalent for older browsers and scanners.
|
||||
response.headers.set('X-Frame-Options', 'DENY');
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,9 @@ export function middleware(request: NextRequest) {
|
||||
}
|
||||
|
||||
response.headers.set('Content-Security-Policy', csp);
|
||||
// Anti-clickjacking. `frame-ancestors 'none'` (in the CSP above) is the modern control;
|
||||
// X-Frame-Options: DENY is the legacy equivalent for older browsers and scanners.
|
||||
response.headers.set('X-Frame-Options', 'DENY');
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user