Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function RequireSriFor({scripts, styles}: Props) {
const value: SriAsset[] = [];
if (scripts) {
value.push(SriAsset.Script);
}
if (styles) {
value.push(SriAsset.Style);
}
useCspDirective(CspDirective.RequireSriFor, value);
return null;
}