我有一个身份服务器设置使用identityserver3,每当我去连接我的网站后,它会被捕捉到一个看似永久的重定向。
我打开了日志,我注意到一些与CSP相关的行在里面,这让我认为这是问题所在,但我不知道如何修复它。
2016-01-13 12:43:17.738 -05:00信息渲染登录页面 2016-01-13 12:43:18.203 -05:00 2016-01-13 12:43:18.208 -05:00信息CSP报告数据:“{\”csp\“{\”阻止-uri\“:\”self\“,\”http://example.com.com:44200/core/login?signin=someGuid\“,\”line\“1,\”原始-策略\“:\”默认-src http://example.com:44200;脚本-src http://example.com:44200;样式-src http://example.com:44200‘不安全-inline’;img-src *;report-uri http://example.com:44200/core/csp/report\“、”referrer\“:\”\“、\”脚本-示例“:\”尝试{ for(var lastpass_iter=0;lastpass.\“)、\”源文件“:\”http://example.com:44200/core/login?signin=someGuid\“、\”违反-指令“:\”脚本-srchttp://example.com:44200“}”}“ 2016-01-13 12:43:18.208 -05:00信息CSP报告数据:“{\”csp-报告\“{\”阻止-uri\“:\”self\“,\”http://example.com:44200/core/login?signin=someGuid\“,\”原始-策略\“:\”默认-src http://example.com:44200;脚本-src http://example.com:44200;样式-src http://example.com:44200‘不安全-inline’;img-src *;报表-uri http://example.com:44200/core/csp/report\",\"referrer\":\"\",\“脚本-示例”:\“IMG元素上的onerror属性”,\“源文件”:\“http://example.com:44200/core/login?signin=someGuid\”,\“违反-指令”:\“script-srchttp://example.com:44200\”}“ 2016-01-13 12:43:18.223 -05:00信息CSP报告数据:"{\"csp-report\":{\"blocked-uri\":\"data:image/png;base64,_report-uri http://example.com:44200/core/csp/report\",\"referrer\":\"\",\“违反-指令”:\“img*”}“” 2016-01-13 12:43:18.226 -05:00资讯渲染204
发布于 2016-01-13 20:50:52
您可以使用您的CSPOptions属性修改CSP选项。在这里找到文档:https://identityserver.github.io/Documentation/docsv2/advanced/csp.html
如果您想测试CSP是否是您的问题,可以尝试使用这些选项完全禁用它。
查看日志,您可能需要将值'self'添加到ScriptSrc。
https://stackoverflow.com/questions/34774758
复制相似问题