Replies: 1 comment
-
|
Using the There's nothing jQuery really can do here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
We have encountering a Content Security Policy (CSP) violation in our ASP.NET application related to inline styles being blocked.
The browser console logs this error:
"Refused to apply inline style because it violates the following Content Security Policy directive: 'style-src 'self''."
This occurs when jQuery (v3.7.1.0 and its plugins) or some frontend script attempts to set inline styles dynamically β for example, using
.css()or.attr('style', ...).This occurs when inline
<script>tags or jQuery-related dynamic execution (likeeval()orFunction()) is used.CSP Header in use:
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self';
Request for Guidance:
<style>tags or jQuery-generated styles?Appreciate your input or recommended approach.
Regards,
Beta Was this translation helpful? Give feedback.
All reactions