Skip to content

Commit

Permalink
fix: explicity set X-XSS-Protection to 0 in koa middleware per <helme…
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Apr 7, 2023
1 parent adf0c86 commit e0fb7fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ module.exports = (redis) => ({
app.context.client,
app.context.logger
);
app.use((ctx, next) => {
// since we're on an older helmet version due to koa-helmet
// <https://github.com/helmetjs/helmet/issues/230>
ctx.set('X-XSS-Protection', '0');
return next();
});
},
hookBeforePassport(app) {
app.use(async (ctx, next) => {
Expand Down

0 comments on commit e0fb7fc

Please sign in to comment.