Unable to use ContentSecurityPolicyOptions because it is not exported
serenaqchen opened this issue · comments
Serena commented
Previously I was able to gain access to ContentSecurityPolicyOptions
through this:
import { ContentSecurityPolicyOptions } from 'helmet/dist/types/middlewares/content-security-policy';
Seem like ContentSecurityPolicyOptions
is not exported so I can no longer access it.
Evan Hahn commented
Sorry about this. That import was never supported, but does this work for you?
type ContentSecurityPolicyOptions = Parameters<typeof helmet.contentSecurityPolicy>[0];
Serena commented
Yes, it does! Thank you!