This commit is contained in:
parent
841703df35
commit
516b924afa
@ -8,6 +8,7 @@
|
|||||||
{%- set net = salt['pillar.get']('net') -%}
|
{%- set net = salt['pillar.get']('net') -%}
|
||||||
{%- set fqdn = salt['grains.get']('fqdn') -%}
|
{%- set fqdn = salt['grains.get']('fqdn') -%}
|
||||||
{%- set country = salt['grains.get']('country') -%}
|
{%- set country = salt['grains.get']('country') -%}
|
||||||
|
{%- set location = salt['grains.get']('location') -%}
|
||||||
|
|
||||||
{% set peers_ip = [] %}
|
{% set peers_ip = [] %}
|
||||||
{%- for k,v in haproxy.peers.items() %}
|
{%- for k,v in haproxy.peers.items() %}
|
||||||
|
@ -94,6 +94,7 @@ global
|
|||||||
mworker-max-reloads 2
|
mworker-max-reloads 2
|
||||||
maxconn 1000
|
maxconn 1000
|
||||||
set-var proc.country str('{{ country }}')
|
set-var proc.country str('{{ country }}')
|
||||||
|
set-var proc.location str('{{ location }}')
|
||||||
lua-prepend-path {{ haproxy.config.dir }}/mods/?.so cpath
|
lua-prepend-path {{ haproxy.config.dir }}/mods/?.so cpath
|
||||||
lua-prepend-path {{ haproxy.config.dir }}/scripts/?.lua
|
lua-prepend-path {{ haproxy.config.dir }}/scripts/?.lua
|
||||||
{%- for script,params in haproxy.config.scripts.items() %}
|
{%- for script,params in haproxy.config.scripts.items() %}
|
||||||
@ -184,7 +185,7 @@ frontend fe_http from {{ haproxy.config.namespace }}
|
|||||||
## Returns
|
## Returns
|
||||||
http-request return status 200 content-type text/plain string "User-agent: *\r\nAllow: /" if robots_txt
|
http-request return status 200 content-type text/plain string "User-agent: *\r\nAllow: /" if robots_txt
|
||||||
http-request return status 200 content-type text/plain string "Contact: mailto:{{ haproxy.config.syscontact }}" if security_txt
|
http-request return status 200 content-type text/plain string "Contact: mailto:{{ haproxy.config.syscontact }}" if security_txt
|
||||||
http-request return status 200 content-type "text/html; charset=utf-8" lf-string "<html><body>host: %H<br/>country: %[var(proc.country)]<br/>date: %[var(txn.httpdate)]<br/>src: %[var(req.src)]<br/>srchash: %[var(txn.srchash)]</body></html>" if self_host path_info
|
http-request return status 200 content-type "text/html; charset=utf-8" lf-string "<html><body>host: %H<br/>location: %[var(proc.location)], %[var(proc.country)]<br/>date: %[var(txn.httpdate)]<br/>src: %[var(req.src)]<br/>srchash: %[var(txn.srchash)]</body></html>" if self_host path_info
|
||||||
|
|
||||||
{%- if haproxy.config.http_overrides|default([]) %}
|
{%- if haproxy.config.http_overrides|default([]) %}
|
||||||
{%- for override in haproxy.config.http_overrides %}
|
{%- for override in haproxy.config.http_overrides %}
|
||||||
@ -262,7 +263,7 @@ frontend fe_https from {{ haproxy.config.namespace }}
|
|||||||
## Returns
|
## Returns
|
||||||
http-request return status 200 content-type text/plain string "User-agent: *\r\nAllow: /" if robots_txt
|
http-request return status 200 content-type text/plain string "User-agent: *\r\nAllow: /" if robots_txt
|
||||||
http-request return status 200 content-type text/plain lf-file /etc/haproxy/static/security.txt if security_txt
|
http-request return status 200 content-type text/plain lf-file /etc/haproxy/static/security.txt if security_txt
|
||||||
http-request return status 200 content-type "text/html; charset=utf-8" lf-string "<html><body>host: %H<br/>country: %[var(proc.country)]<br/>date: %[var(txn.httpdate)]<br/>src: %[var(req.src)]<br/>srchash: %[var(txn.srchash)]</body></html>" if self_host path_info
|
http-request return status 200 content-type "text/html; charset=utf-8" lf-string "<html><body>host: %H<br/>location: %[var(proc.location)], %[var(proc.country)]<br/>date: %[var(txn.httpdate)]<br/>src: %[var(req.src)]<br/>srchash: %[var(txn.srchash)]</body></html>" if self_host path_info
|
||||||
|
|
||||||
## Headers
|
## Headers
|
||||||
http-request set-header X-Proxy-Id "%H"
|
http-request set-header X-Proxy-Id "%H"
|
||||||
|
Loading…
Reference in New Issue
Block a user