Tell us what’s happening:
Describe your issue in detail here.
I am getting this error
Error: csp must be called with an object argument. See the documentation
but I have written correctly
app.use(helmet.contentSecurityPolicy(
{ directives: { defaultSrc: [“‘self’”], scriptSrc: [“‘self’”, “trusted-cdn.com”] }} ));
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Information Security with HelmetJS - Set a Content Security Policy with helmet.contentSecurityPolicy()
Link to the challenge: