I use sbt to build a play-scala-seed project, and add a simple:
<button id="doclick" onclick="doConsole();">click</button>
But when I start the project and click the button. Console gives the error output:
localhost/:17 Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src *". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
application.conf
play.http.filters = "filter.Filters"
play.filters.headers.contentSecurityPolicy="script-src 'self' 'unsafe-inline'"
Just follow the offical doc play-securityheaders
Did I miss something or get the wrong path cause still can not call inline script?