Skip to content

Commit e0fb7fc

Browse files
committed
fix: explicity set X-XSS-Protection to 0 in koa middleware per <helmetjs/helmet#230>
1 parent adf0c86 commit e0fb7fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/web.js

+6
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ module.exports = (redis) => ({
187187
app.context.client,
188188
app.context.logger
189189
);
190+
app.use((ctx, next) => {
191+
// since we're on an older helmet version due to koa-helmet
192+
// <https://github.com/helmetjs/helmet/issues/230>
193+
ctx.set('X-XSS-Protection', '0');
194+
return next();
195+
});
190196
},
191197
hookBeforePassport(app) {
192198
app.use(async (ctx, next) => {

0 commit comments

Comments
 (0)