mirror of
https://github.com/HeyPuter/puter.git
synced 2026-02-22 06:30:00 -06:00
Disable iframing of the main domain
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user