Next.js Discord

Discord Forum

TrustedTypes with CSP headers

Unanswered
Greek Harehound posted this in #help-forum
Open in Discord
Greek HarehoundOP
Have anybody been successful with implemented required-trusted-types-for CSP header alongside with NextJS?

In my NextJS app I am setting an element's innerHTML using dangerousSetInnerHtml={{ __html: DOMPurify.sanitize(myContent, { RETURN_TRUSTED_TYPE: true }) }}

0 Replies