How to remove/avoid unsafe-eval in GWT with CSP?

42 views
Skip to first unread message

Deepali Sharma

unread,
Aug 29, 2025, 1:35:25 AM (7 days ago) Aug 29
to GWT Users

Hi all,

I am working on a GWT application and facing issues with Content Security Policy (CSP). Currently, GWT uses eval() (or similar dynamic code execution), which means I need to allow unsafe-eval in my CSP. Without this, the page does not load at all.

This is causing repeated failures in application security scans, since unsafe-eval is considered a security risk.

  • Is there a way to remove or avoid unsafe-eval in GWT?

  • Does GWT provide a CSP-compliant compilation mode or configuration to handle this?

  • If yes, how can I enable it in my project (Maven/GWT config)?

Any guidance or best practices to make GWT work with CSP without unsafe-eval would be really helpful.

Thanks!

Craig Mitchell

unread,
Aug 29, 2025, 2:41:14 AM (7 days ago) Aug 29
to GWT Users
Sounds like you're hitting this:  https://github.com/gwtproject/gwt/issues/9578
Reply all
Reply to author
Forward
0 new messages