Adding a header with Haproxy

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

ro:Adăugați un antet cu Haproxy ru:Добавление заголовка с помощью Haproxy pl:Dodaj nagłówek za pomocą Haproxy ja:Haproxyによるヘッダの追加 zh:用Haproxy添加一个头 de:Hinzufügen eines Headers mit Haproxy nl:Voeg een header toe met Haproxy it:Aggiungere un'intestazione con Haproxy pt:Adicionar um cabeçalho com Haproxy es:Añadir una cabecera con Haproxy fr:Ajouter une en-tête avec Haproxy
This article has been created by an automatic translation software. You can view the article source here.

Introduction

We will see how to add an HTTP header with Haproxy.

Course

This can be done in the frontend, listen, or backend section of your Haproxy configuration.

In our example Haproxy is used for SSL offloading, it communicates with our backend (a Nginx server for example) in HTTP.
The application behind it is configured to force HTTPS, in order not to create a redirection loop we will have to send it a header to inform it that the initial protocol is HTTPS.
To do this, we will use Haproxy in our frontend configured in HTTPS, add a header X-Forwarded-Proto declared in https like this:

http-request add-header X-Forwarded-Proto https





Cet article vous a semblé utile ?

0



You are not allowed to post comments.