From 0ab34ab3127dfd6fcadd501ddb8b854b3da69445 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Fri, 12 Jul 2024 07:43:35 +0200 Subject: [PATCH] updated haproxy state --- states/haproxy/templates/haproxy.cfg.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/states/haproxy/templates/haproxy.cfg.j2 b/states/haproxy/templates/haproxy.cfg.j2 index b6803d1..dd86306 100644 --- a/states/haproxy/templates/haproxy.cfg.j2 +++ b/states/haproxy/templates/haproxy.cfg.j2 @@ -6,7 +6,7 @@ {%- macro internal() -%} acl internal src -f {{ haproxy.config.dir }}/maps/access - http-response return status 403 content-type text/html string "

403 forbidden

" if !internal + http-response return status 403 content-type text/html string "

403 forbidden

" unless internal {%- endmacro -%} {%- macro head() -%} @@ -172,7 +172,7 @@ frontend fe_http from {{ haproxy.config.namespace }} http-request set-var(req.host) req.hdr(Host) http-request set-var(req.accesshash) str(),concat(,req.src,),concat(-,req.host,) - http-request return status 200 content-type text/html lf-string "host: %H\ndate: %[var(txn.httpdate)]\nsrchash: %[var(txn.srchash)]\n" if self_host path_info + http-request return status 200 content-type "text/html; charset=utf-8" lf-string "host: %H
date: %[var(txn.httpdate)]
srchash: %[var(txn.srchash)]" if self_host path_info {%- if haproxy.config.geoip.enabled %} ## GeoIP {{ geoip() }}