Difference between revisions of "Adding a header with Haproxy"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
(Created page with "<span data-link_translate_fr_title="Ajouter une en-tête avec Haproxy" data-link_translate_fr_url="Ajouter une en-tête avec Haproxy"></span>:fr:Ajouter une en-tête avec H...")
 
Line 1: Line 1:
 +
<span data-link_translate_es_title="Añadir una cabecera con Haproxy"  data-link_translate_es_url="Añadir una cabecera con Haproxy"></span>[[:es:Añadir una cabecera con Haproxy]][[es:Añadir una cabecera con Haproxy]]
 
<span data-link_translate_fr_title="Ajouter une en-tête avec Haproxy"  data-link_translate_fr_url="Ajouter une en-tête avec Haproxy"></span>[[:fr:Ajouter une en-tête avec Haproxy]][[fr:Ajouter une en-tête avec Haproxy]]
 
<span data-link_translate_fr_title="Ajouter une en-tête avec Haproxy"  data-link_translate_fr_url="Ajouter une en-tête avec Haproxy"></span>[[:fr:Ajouter une en-tête avec Haproxy]][[fr:Ajouter une en-tête avec Haproxy]]
 
<br />This article has been created by an automatic translation software. You can view the article source [[:fr:Ajouter une en-tête avec Haproxy|here]].<br /><span data-translate="fr"></span><br />
 
<br />This article has been created by an automatic translation software. You can view the article source [[:fr:Ajouter une en-tête avec Haproxy|here]].<br /><span data-translate="fr"></span><br />

Revision as of 09:49, 8 July 2021

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.