mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
Disable iframing of the main domain
This commit is contained in:
parent
874928e845
commit
ef35a04c4a
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user