pedestal

olle 2019-04-18T08:08:40.040600Z

Hi I'm trying to serve a static js using

::http/resource-path   "public"
in the service map but I get an csp error
Refused to load the script '<https://xxx/stats/stats.js>' because it violates the following Content Security Policy directive: "script-src self". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
.

olle 2019-04-18T08:09:27.041100Z

Any tips 🙂

Ivan 2019-04-18T08:30:24.041500Z

It seems to me you have to configure CSP for your use case

Ivan 2019-04-18T08:30:32.041700Z

https://github.com/pedestal/pedestal/issues/499

olle 2019-04-18T09:27:46.043300Z

Tnx yes I managed to solve it by adding

::http/secure-headers {:content-security-policy-settings {:script-src "https://*.<http://olle.com:*%22|olle.com:*">}}
to my service map.

👍 1