Hi,
I’m working on a classic GWT application and trying to apply a strict Content Security Policy (CSP) using a nonce generated per request.
CSP Using:
What’s working:
The app loads and runs correctly.
GWT is able to load its scripts dynamically.
The iframe now uses a safe URL (about:blank) instead of a javascript: URL and works with the current CSP.
No functional issues in the app.
What’s the problem:
Even though everything works, the browser console shows this error:
The stack trace originates from GWT code-splitting (runAsync), specifically during execution of split fragments (e.g., application-0.js).
This appears to involve runtime JavaScript execution via javascript: URLs, which is blocked under strict CSP.
My questions:
Is there a supported way in GWT to avoid this javascript: execution when using code splitting?
Is this console error considered a known limitation of classic GWT under strict CSP, and acceptable if the application works correctly?
I’d like to keep CSP strict and avoid adding unsafe-inline.
Thanks!