Chrome Extension - Content Security Policy - executing inline code

后端 未结 6 1662
梦谈多话
梦谈多话 2020-12-08 10:15

I am using an external JavaScript lib in my chrome extension. I has inline execution, so I get following kind of error

(The error I get on console)

6条回答
  •  粉色の甜心
    2020-12-08 10:40

    You can config the csp nonce like this

    
    Content-Security-Policy: script-src 'nonce-xyz123'; style-src 'nonce-xyz123';
    
    
    
    
                                     
                  
提交回复
热议问题