Skip to content

Commit

Permalink
TEMP: remove csp config
Browse files Browse the repository at this point in the history
  • Loading branch information
this-pama committed Dec 16, 2024
1 parent bc678ba commit 802026e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ app.use((req, res, next) => {
next();
});

if (process.env.NODE_ENV == "production") {
app.use(helmet(csp_config));
}
// if (process.env.NODE_ENV == "production") {
// app.use(helmet(csp_config));
// }
app.use(function (req, res, next) {
res.setHeader("Access-Control-Allow-Origin", "*");
next();
Expand All @@ -46,7 +46,13 @@ app.use("/scripts", express.static(path.join(__dirname, "./node_modules")));
app.use("/config", express.static(path.join(__dirname, "./config")));
app.use(bodyParser.json({ limit: "50mb" }));
app.use(bodyParser.urlencoded({ limit: "50mb", extended: true }));
app.use(xss());
const options = {
allowedKeys: ["referer"],
allowedAttributes: {
referer: ["&"],
},
};
app.use(xss(options));

const cookie = {
domain: process.env.NODE_ENV === "production" ? app_base_host : undefined,
Expand Down

0 comments on commit 802026e

Please sign in to comment.