You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background: This is a next.js project, but this issue should be common for any web project which uses a strict Content Security Policy.
Problem: The map uses inline styles which are not rendering properly when the CSP's style-src is set to self. Adding unsafe-inline to the style-src does the job, but it is not a safe practice, so looking for better ways to handle this.
Suggested Solution: Implement a nonce in the API, so we can pass the nonce to override the styles of the map.
<WorldMapcolor="red"title="Top 10 Populous Countries"value-suffix="people"size="lg"data={data}nonce={nonce}//where nonce is a random string passed as a prop. />
Background: This is a next.js project, but this issue should be common for any web project which uses a strict Content Security Policy.
Problem: The map uses inline styles which are not rendering properly when the CSP's
style-src
is set toself
. Addingunsafe-inline
to thestyle-src
does the job, but it is not a safe practice, so looking for better ways to handle this.Suggested Solution: Implement a nonce in the API, so we can pass the nonce to override the styles of the map.
More info: https://content-security-policy.com/examples/allow-inline-style/
Screenshot:
The text was updated successfully, but these errors were encountered: