2016-12-05 76 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

相關問題