Properly added pwndpasswords API to CSP

This commit is contained in:
Joel Biddle
2023-08-22 17:58:10 +10:00
parent 196beb8355
commit e288402ec4
2 changed files with 26 additions and 35 deletions
+1 -10
View File
@@ -132,16 +132,7 @@ const main = async () => {
// in production
app.disable("x-powered-by");
app.use(apiLimiter);
app.use(
helmet.contentSecurityPolicy({
useDefaults: true,
directives: {
defaultSrc: ["'self'"],
imgSrc: ["*", "data:"],
connectSrc: ["'self'", "https://api.pwnedpasswords.com/range/"]
}
})
);
app.use(helmet());
}
app.use((req, res, next) => {