Content Security Policy with blob and data

Hi all,

I almost forgot to answer to this. I found a solution to my problem and I share it in case someone faces the same issues and searches for it in the future:
Instead of writing your contentSecurityPolicy in a single line you can do it like this:

        contentSecurityPolicy: >
          default-src 'self' 'unsafe-inline' 'unsafe-eval' *.mydomain.org;
          img-src 'self' blob: data:;
          font-src 'self';

The important part is the ">" after "contentSecurityPolicy:".
Not only does it highly increase the readability of the elements but also blob: and data: are now working simultaneously.

Cheers,
Velaya

1 Like