Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-4Su6mBWzEIFnH4pAGMOuaeBrstwJN4Z3pq/s1Kn4/KQ='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.

解决方法,在nginx加入一行代码,重启nginx即可:

add_header Content-Security-Policy "default-src 'self' 'unsafe-inline';";
Last modification:November 26th, 2019 at 07:03 pm