From b12df30e62157ad154292d8c420f71c663795bdf Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Tue, 31 May 2016 15:29:45 +0200 Subject: [PATCH] net/haproxy: fix option to add X-Forwarded-For header --- net/haproxy/Makefile | 2 +- .../src/opnsense/service/templates/OPNsense/HAProxy/+MANIFEST | 2 +- .../opnsense/service/templates/OPNsense/HAProxy/haproxy.conf | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 08ae2c6ae..b99ae400e 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= haproxy -PLUGIN_VERSION= 1.1 +PLUGIN_VERSION= 1.2 PLUGIN_COMMENT= Reliable, high performance TCP/HTTP load balancer PLUGIN_DEPENDS= haproxy PLUGIN_MAINTAINER= opnsense@moov.de diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/+MANIFEST b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/+MANIFEST index b80518cf9..b8ece5deb 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/+MANIFEST +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/+MANIFEST @@ -1,5 +1,5 @@ name: opnsense-haproxy -version: 1.1 +version: 1.2 origin: opnsense/haproxy comment: load balancer desc: Reliable, high performance TCP/HTTP load balancer diff --git a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf index f287f9779..81b5a454e 100644 --- a/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf +++ b/net/haproxy/src/opnsense/service/templates/OPNsense/HAProxy/haproxy.conf @@ -554,6 +554,9 @@ frontend {{frontend.name}} {% if frontend.defaultBackend|default("") != "" %} {% set backend_data = helpers.getUUID(frontend.defaultBackend) %} default_backend {{backend_data.name}} +{% endif %} +{% if frontend.forwardFor == '1' %} + option forwardfor {% endif %} # tuning options {% if frontend.tuning_maxConnections is defined %}