cur*_*ial 5 javascript content-security-policy openid-connect identityserver4 oidc-client-js
我正在使用 oidc-client 构建 SPA,以登录到使用 Identity Server 4 构建的 IDP。
登录重定向似乎工作正常,但在 Firefox 上我遇到以下 CSP 问题
Content Security Policy: Ignoring "'unsafe-inline'" within script-src or style-src: nonce-source or hash-source specified (unknown)
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src 'unsafe-inline' 'sha256-VDXN0nOpFPQ102CIVz+eimHA5e+wTeoUUQj5ZYbtn8w='"). Source: !function(t){function __webpack_require_.... checksession:1
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src 'unsafe-inline' 'sha256-VDXN0nOpFPQ102CIVz+eimHA5e+wTeoUUQj5ZYbtn8w='"). Source: window.devToolsOptions = Object.assign(w.... checksession:1
Load denied by X-Frame-Options: http://localhost:5007/home/error?errorId=a74accc61bb821ee1f42f7013a306e90 does not permit cross-origin framing. (unknown)
Run Code Online (Sandbox Code Playgroud)
我没有在 SPA 上设置任何 CSP 元标记,我想知道是否必须这样做。稍微挖掘一下,似乎 oidc-client 正在将一个 iframe 添加到我的应用程序中,该 iframe 指向 Identity Server 中的 checksession 页面(其中确实包含 CSP 标头“default-src 'none'; script-src 'unsafe-inline' ” sha256-VDXN0nOpFPQ102CIVz+eimHA5e+wTeoUUQj5ZYbtn8w='")
有人可以帮助我解决这个问题或引导我走向正确的方向吗?我对 CSP 的了解非常基础。
| 归档时间: |
|
| 查看次数: |
1945 次 |
| 最近记录: |