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
This is my first submission.
Thank you in advance for your cooperation.
I am not good at English, Sorry if it is hard to read in my poor English.
I apologize for any confusion. It's appropriate to provide the details here since you were unsure whether to create an issue or start a discussion. If there is an issue, please let me know, and I'll assist you accordingly.
Expected behavior:
I expected the code to execute without errors after applying the nonce to the Style tags.
Describe the bug:
When setting the nonce and attempting to execute the code, I encountered the following errors:
※I am attaching a screenshot of the error being displayed. We would appreciate it if you could check it.
Error:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src-elem 'self' 'nonce-474cd72a-68a6-4c73-ab04-3be566102f8f'". Either the 'unsafe-inline' keyword, a hash ('sha256-AbpHGcgLb+kRsJGnwFEktk7uzpZOCcBY74+YBdrKVGs='), or a nonce ('nonce-...') is required to enable inline execution.
Execute the code containing the following snippets:
Snippet 1:
jsxCopy code
function insertStyle(style, options) {
var insertionPoint = options.insertionPoint;
var nextNode = findPrevNode(options);
if (nextNode !== false && nextNode.parent) {
nextNode.parent.insertBefore(style, nextNode.node); // Error occurs here
return;
}
if (insertionPoint && typeof insertionPoint.nodeType === 'number') {
var insertionPointElement = insertionPoint;
var parentNode = insertionPointElement.parentNode;
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);
else process.env.NODE_ENV !== "production" ? warning(false, '[JSS] Insertion point is not in the DOM.') : void 0;
return;
}
getHead().appendChild(style); // Error occurs here
}
Snippet 2:
jsxCopy code
_proto.deploy = function deploy() {
var sheet = this.sheet;
if (!sheet) return;
if (sheet.options.link) {
this.insertRules(sheet.rules);
return;
}
this.element.textContent = "\n" + sheet.toString() + "\n"; // Error occurs here
}
Versions (please complete the following information):
OS [e.g. Windows, macOS]: Windows 10、Windows 11、macOS
Material-ui : v4
Server Side Rendering(SSR):not use
Managing expectations:
Is there a solution, and if so, can you please tell me how to deal with it?
If it seems difficult to deal with, can we enroll in commercial support and you will be able to help us?
The text was updated successfully, but these errors were encountered:
This is my first submission.
Thank you in advance for your cooperation.
I am not good at English, Sorry if it is hard to read in my poor English.
I apologize for any confusion. It's appropriate to provide the details here since you were unsure whether to create an issue or start a discussion. If there is an issue, please let me know, and I'll assist you accordingly.
Expected behavior:
I expected the code to execute without errors after applying the nonce to the Style tags.
Describe the bug:
When setting the nonce and attempting to execute the code, I encountered the following errors:
※I am attaching a screenshot of the error being displayed. We would appreciate it if you could check it.
Error:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src-elem 'self' 'nonce-474cd72a-68a6-4c73-ab04-3be566102f8f'". Either the 'unsafe-inline' keyword, a hash ('sha256-AbpHGcgLb+kRsJGnwFEktk7uzpZOCcBY74+YBdrKVGs='), or a nonce ('nonce-...') is required to enable inline execution.
Reproduction:
We are in the process of applying the Content Security Policy (CSP).
CSP support: https://cssinjs.org/csp/?v=v10.8.2
To reproduce the issue, follow these steps:
1.set the following csp header
property="csp-nonce"
http-equiv="Content-Security-Policy"
Snippet 1:
Snippet 2:
Versions (please complete the following information):
Managing expectations:
Is there a solution, and if so, can you please tell me how to deal with it?
If it seems difficult to deal with, can we enroll in commercial support and you will be able to help us?
The text was updated successfully, but these errors were encountered: