Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
routes: set X-Frame-Options: DENY
Browse files Browse the repository at this point in the history
* Mitigation measure against clickjacking.
  • Loading branch information
n-riesco committed Jul 13, 2018
1 parent adbbbad commit 24c1e87
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,14 @@ export default class Servers {

that.electronWindow = that.httpsServer.electronWindow || that.httpServer.electronWindow;

server.pre(function (req, res, next) {
res.header(
'X-Frame-Options',
'DENY'
);
next();
});

server.use(CookieParser.parse);
server.use(PlotlyOAuth(Boolean(that.isElectron)));

Expand Down

0 comments on commit 24c1e87

Please sign in to comment.