头盔 CSP 无法正常工作?

Tca*_*det 5 security node.js express content-security-policy helmet.js

使用 Express 分发的 Vue SPA。

这是我在快递中的头盔代码

app.use(helmet.contentSecurityPolicy({
  directives: {
   defaultSrc: ["'self'"],
   styleSrc: ["'self'","'unsafe-inline'" ,'unpkg.com', 'cdn.jsdelivr.net', 
   'fonts.googleapis.com', 'use.fontawesome.com'],
   scriptSrc: ["'self'","'unsafe-inline'",'js.stripe.com'],
   frameSrc: ["'self'",'js.stripe.com'],
   fontSrc:["'self'",'fonts.googleapis.com','fonts.gstatic.com','use.fontawesome.com','cdn. joinhoney.com']
 }
}));
Run Code Online (Sandbox Code Playgroud)

这样做不会在浏览器控制台中产生错误,但我的页面加载为空白,我是否遗漏了什么?

这是我尝试在 index.html 中导入的内容

<script src="https://js.stripe.com/v3/"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css">
<link href="https://unpkg.com/vuetify/dist/vuetify.min.css" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700%7CMaterial+Icons' rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
Run Code Online (Sandbox Code Playgroud)

Tca*_*det -2

通过将“'unsafe-eval'”添加到我的 scriptSrc 解决了我的问题