CAS SSO的CORS问题

时间:2019-01-11 13:48:28

标签: angular spring-security cors single-sign-on cas

我正在构建一个基于spring和angular的应用程序,该应用程序试图通过cas sso进行身份验证。 当前流如下:

  • 在Chrome中请求前端
  • xhr到后端以获取数据
    • 如果未通过身份验证,后端应重定向到cas,或者如果用户通过身份验证,则应传输请求的数据
    • 由于cors失败,无论是否登录
Access to XMLHttpRequest at 'https://[cas-server].[other-domain].de/login?service=http%3A%2F%2F[computer-name].[domain].de%3A4200%2Flogin' (redirected from 'http://[computer-name].[domain].de:4200/api/servers') from origin 'http://[computer-name].[domain].de:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
春天后端cas中的

https://github.com/kakawait/cas-security-spring-boot-starter配置

cas服务器网址正确,并且代理验证已禁用。

服务基本网址是正确重定向的前端之一

是否真的有必要更改cas服务器以设置CORS标头,或者是否可以通过其他方式实现目标?

预先感谢

0 个答案:

没有答案