Skip to content

Commit

Permalink
fix: set x-frame-options to deny (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair authored and bcoe committed Dec 18, 2019
1 parent d0da281 commit 1a3ec1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html/token-settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ <h3>Package specific publish token.</h3>
}
</script>
</body>
</html>
</html>
2 changes: 2 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ app.get('/_/token-settings', wrap(async (req, res) => {
}

res.header('content-type', 'text/html');
res.header('x-frame-options','deny');
res.end(tokenSettingsPage);
}));

Expand All @@ -647,6 +648,7 @@ app.get('/_/manage-tokens', wrap(async (req, res) => {
let page = manageTokensPage + '';
page = page.replace('{username}', req.session!.user.login);

res.header('x-frame-options','deny');
res.header('content-type', 'text/html');
res.end(page);
}));
Expand Down

0 comments on commit 1a3ec1b

Please sign in to comment.