I'm trying to allow all image sources on my website, but I'm not sure how to set Helmet to allow that. When I comment out app.use(helmet() it works, but when I try anything else I get errors like this in the console:
The resource at “https://cdn.discordapp.com/icons/1025999194395246632/fb3dcad8b3e9bed9b21e9965c7e0d2b1.png” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)#
I've tried setting img-src to an asterisk, but that still gives me the same error.
app.use(helmet({
contentSecurityPolicy: {
directives: {
...helmet.contentSecurityPolicy.getDefaultDirectives(),
"img-src": ["'self'", "cdn.discordapp.com"],
},
},
}));

is the correct answer
