2016-12-05 77 views
0

因此,我有一个大三角帆在https负载平衡器后面运行,并且我的外部端口使用标准443端口映射到端口9000上的大三角帆实例。我几乎获得了所有内容除了来自门户的重定向之外,还在将:9000端口附加到我的URL。发送到https://my.url.com/gate/auth/redirect?to=https://my.url.com/#/infrastructureSpinnaker Gate正在重定向到不正确的身份验证URL

请求发回具有在301 location:https://my.url.com:9000/gate/login这将失败,因为负载平衡器仅监听443。如果我手动删除端口,向右走至https://my.url.com/gate/login作品如预期的OAuth流的位置标头重定向响应并且一旦验证了所有卡组功能和随后的门查询按预期工作。

在我的/ etc /默认/三角帆文件我有

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

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

spring: 
oauth2: 
    client: 
    preEstablishedRedirectUri: ${SPINNAKER_GATE_BASEURL}/login 
    useCurrentUri: false 

,我已经跑了/opt/spinnaker/bin/reconfigure_spinnaker.sh再加上重新启动以确保甲板和大门得到更新。有没有人有任何想法,我可能会错过?

回答

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

相关问题