fix(search): Allow csp to always trust search.freecodecamp.org

This commit is contained in:
Stuart Taylor
2018-02-12 22:38:42 +00:00
committed by GitHub
parent 77b7b17096
commit c6975c77df

View File

@ -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}`
]);
}