【发布时间】:2023-02-06 19:07:54
【问题描述】:
我迁移了一个用 jhipster 版本 6.3.0 生成的 jhipster 应用程序。
除了招摇,一切都对。我现在不想迁移到 springdoc。我只养了springfox。
转到/admin/docs 时出现此异常:
Refused to frame 'http://swagger.io/' because it violates the following Content Security Policy directive: "frame-src 'self' data:".
我应该更改 CSP 还是其他?
现在我在SecurityConfiguration 中有这一行
.contentSecurityPolicy("default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com; style-src 'self' https://fonts.googleapis.com 'unsafe-inline'; img-src 'self' www.googletagmanager.com https://www.google-analytics.com data:; font-src 'self' https://fonts.gstatic.com data:")
【问题讨论】:
标签: swagger jhipster swagger-ui