Translated message

A translation of this page exists in English.

HTTP ルートを介して Pod への X-Forwarded-Proto ヘッダーを維持する方法

Solution Unverified - Updated -

Issue

  • 外部ロードバランサーは SSL をオフロードするため、ロードバランサーと OpenShift HAProxy Router の間の接続はすべて HTTP になります。
  • クライアントアプリケーションによって定義された X-Forwarded-Proto ヘッダーを維持するにはどうすればよいですか?
Client -(https)-> Load balancer (SSL termination) -(http)-> Haproxy (Openshift Router) -> Container
  • クライアントアプリケーションは http または https リクエストを送信します。F5 ロードバランサーはこれを http にオフロードします。
  • クライアントアプリケーションは X-Forwarded-Proto を送信します。F5 ロードバランサーはこれを上書きせず、https を http にオフロードした場合でも維持します。
  • F5 ロードバランサーから転送された X-Forwarded-Proto を維持するには、HAProxy ルーターが必要です。
  • ビルトインの設定は機能しません。
http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
http-request set-header X-Forwarded-Proto https if { ssl_fc }
  • これは F5 と HAProxy の間の接続に基づいて設定されるため、常に http になります。

Environment

  • Red Hat OpenShift Container Platform
    • 3.9 以降

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content