mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 01:26:29 -04:00
added a new config option httpHeaders
used by helmet
This commit is contained in:
parent
d730dd04bf
commit
3b55886c45
3 changed files with 6 additions and 1 deletions
|
@ -25,6 +25,9 @@ const defaults = {
|
|||
units: "metric",
|
||||
zoom: 1,
|
||||
customCss: "css/custom.css",
|
||||
// httpHeaders used by helmet, see https://helmetjs.github.io/. You can add other/more object values by overriding this in config.js,
|
||||
// e.g. you need to add `frameguard: false` for embedding MagicMirror in another website, see https://github.com/MichMich/MagicMirror/issues/2847
|
||||
httpHeaders: { contentSecurityPolicy: false, crossOriginOpenerPolicy: false, crossOriginEmbedderPolicy: false, crossOriginResourcePolicy: false, originAgentCluster: false },
|
||||
|
||||
modules: [
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ function Server(config, callback) {
|
|||
res.status(403).send("This device is not allowed to access your mirror. <br> Please check your config.js or config.js.sample to change this.");
|
||||
});
|
||||
});
|
||||
app.use(helmet({ contentSecurityPolicy: false, crossOriginOpenerPolicy: false, crossOriginEmbedderPolicy: false, crossOriginResourcePolicy: false, originAgentCluster: false }));
|
||||
app.use(helmet(config.httpHeaders));
|
||||
|
||||
app.use("/js", express.static(__dirname));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue