Skip to content
Snippets Groups Projects
Unverified Commit e61dfd80 authored by Timothy Carambat's avatar Timothy Carambat Committed by GitHub
Browse files

Prevent i-framing of frontend UI to prevent unsafe embedding and/or clickjacking (#1200)

Prevent iframing of frontend UI to prevent unsafe embedding and/or clickjacking
parent 42e1d8e8
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,14 @@ embeddedEndpoints(apiRouter);
if (process.env.NODE_ENV !== "development") {
app.use(
express.static(path.resolve(__dirname, "public"), { extensions: ["js"] })
express.static(path.resolve(__dirname, "public"), {
extensions: ["js"],
setHeaders: (res) => {
// Disable I-framing of entire site UI
res.removeHeader("X-Powered-By");
res.setHeader("X-Frame-Options", "DENY");
},
})
);
app.use("/", function (_, response) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment