Content Security Policy “data” not working for base64 Images in Chrome 28

后端 未结 2 1004
离开以前
离开以前 2020-12-02 12:34

In this simple example, I\'m trying to set a CSP header with the meta http-equiv header. I included a base64 image and I\'m trying to make Chrome load the image.

I t

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 13:27

    According to the grammar in the CSP spec, you need to specify schemes as scheme:, not just scheme. So, you need to change the image source directive to:

    img-src 'self' data:;
    

提交回复
热议问题