Merge pull request #16701 from freeCodeCamp/fix/search
fix(search): Allow csp to always trust search.freecodecamp.org
This commit is contained in:
@ -1,7 +1,8 @@
|
|||||||
import helmet from 'helmet';
|
import helmet from 'helmet';
|
||||||
|
|
||||||
let trusted = [
|
let trusted = [
|
||||||
"'self'"
|
"'self'",
|
||||||
|
'https://search.freecodecamp.org'
|
||||||
];
|
];
|
||||||
|
|
||||||
const host = process.env.HOST || 'localhost';
|
const host = process.env.HOST || 'localhost';
|
||||||
@ -9,8 +10,7 @@ const port = process.env.SYNC_PORT || '3000';
|
|||||||
|
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
trusted = trusted.concat([
|
trusted = trusted.concat([
|
||||||
`ws://${host}:${port}`,
|
`ws://${host}:${port}`
|
||||||
'https://search.freecodecamp.org'
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user