Spinnaker Gate重定向到不正确的身份验证URL

时间:2016-12-05 17:23:44

标签: redirect groovy spinnaker

所以我在一个https负载均衡器后面运行大三角帆,我的外部端口使用标准443,它仍然在9000端口上映射到大三角帆实例。除了从门重定向之外,我已经完成了一切工作仍然将:9000端口附加到我的URL。

发送给int main(int argc, char **argv) { string name; 的请求发回一个重定向响应,其中301 https://my.url.com/gate/auth/redirect?to=https://my.url.com/#/infrastructure中的位置标头失败,因为负载均衡器仅侦听443.如果我手动删除该端口并向右转location:https://my.url.com:9000/gate/login oauth流程按预期工作,一旦刷新所有甲板功能,后续门控查询按预期工作。

在我的/ etc / default / spinnaker文件中我有

https://my.url.com/gate/login

在/opt/spinnaker/config/gate-googleOAuth.yml我有

SPINNAKER_DECK_BASEURL=https://my.url.com
SPINNAKER_GATE_BASEURL=https://my.url.com/gate

我已经跑了spring: oauth2: client: preEstablishedRedirectUri: ${SPINNAKER_GATE_BASEURL}/login useCurrentUri: false 再加上重启以确保卡座和门更新。有没有人有任何想法,我可能会失踪?

1 个答案:

答案 0 :(得分:0)

我发现了我的问题。在这个问题的帮助下,我指出了正确的方向(https://github.com/spinnaker/spinnaker/issues/1112)和一些挖掘,我发现问题在于apache2和反向代理回到了门。

ProxyPassReverse

This directive lets Apache httpd adjust the URL in the Location, Content-Location 
and URI headers on HTTP redirect responses. This is essential when Apache httpd
is used as a reverse proxy (or gateway) to avoid bypassing the reverse proxy because
of HTTP redirects on the backend servers which stay behind the reverse proxy.

来自apache2文档https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreverse

相关问题