From c6975c77df16149d755784ad327fbf440cb512ec Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Mon, 12 Feb 2018 22:38:42 +0000 Subject: [PATCH] fix(search): Allow csp to always trust search.freecodecamp.org --- server/middlewares/csp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/middlewares/csp.js b/server/middlewares/csp.js index f421cf70c7..0464b336e1 100644 --- a/server/middlewares/csp.js +++ b/server/middlewares/csp.js @@ -1,7 +1,8 @@ import helmet from 'helmet'; let trusted = [ - "'self'" + "'self'", + 'https://search.freecodecamp.org' ]; const host = process.env.HOST || 'localhost'; @@ -9,8 +10,7 @@ const port = process.env.SYNC_PORT || '3000'; if (process.env.NODE_ENV !== 'production') { trusted = trusted.concat([ - `ws://${host}:${port}`, - 'https://search.freecodecamp.org' + `ws://${host}:${port}` ]); }