Disable iframing of the main domain

This commit is contained in:
Nariman Jelveh 2024-04-22 14:09:32 -07:00
parent 874928e845
commit ef35a04c4a

View File

@ -336,6 +336,13 @@ class WebServerService extends BaseService {
// res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp')
res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');
// Pass to next layer of middleware
// disable iframes on the main domain
if ( req.hostname === config.domain ) {
// disable iframes
res.setHeader('X-Frame-Options', 'SAMEORIGIN');
}
next();
});