简体   繁体   English

如何理解和解决条带错误?

[英]How to understand and solve stripe error?

In my tour.pug main head file this:在我的tour.pug主头文件中:

extends base
include _reviewCard
block append head
    script(src="https://api.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.js")
    link(href='https://api.mapbox.com/mapbox-gl-js/v2.6.1/mapbox-gl.css' rel='stylesheet')
    script(src='https://js.stripe.com/v3/')
    

In my stripe.js file:在我的stripe.js文件中:

const stripe = Stripe('pk_test_something...')

When I load I get error:当我加载我得到错误:

Refused to load the script 'https://js.stripe.com/v3/' because it violates the following Content Security Policy directive: "script-src https://cdnjs.cloudflare.com https://api.mapbox.com 'self' blob:".拒绝加载脚本“https://js.stripe.com/v3/”,因为它违反了以下内容安全策略指令:“script-src https://cdnjs.cloudflare.com Z5E056C500A1DC500A1C4B6A7110B50D807BADE5Z: com ‘自我’斑点:”。 Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.请注意,'script-src-elem' 没有明确设置,因此 'script-src' 用作后备。

After this I get mapbox error too:在此之后我也得到 mapbox 错误:

Refused to connect to 'ws://localhost:50364/' because it violates the following Content Security Policy directive: "default-src 'self' https://*.mapbox.com".拒绝连接到“ws://localhost:50364/”,因为它违反了以下内容安全策略指令:“default-src 'self' https://*.mapbox.com”。 Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.请注意,'connect-src' 没有明确设置,因此 'default-src' 用作后备。

I didnt understand what mean these errors and how to fix these issues.我不明白这些错误是什么意思以及如何解决这些问题。 Thanks谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM