File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,14 @@ defaults
160160 errorfile {{ errorfile_name }} {{ errorfile }}
161161 {% - endfor %}
162162{% endif %}
163+
164+ {% - for error_name , error_files in salt ['pillar.get' ]('haproxy:httperrors' , {}) | dictsort %}
165+ http-errors {{ error_name }}
166+ {% - for code , file in error_files | dictsort %}
167+ errorfile {{ code }} {{ file }}
168+ {% - endfor %}
169+ {% - endfor %}
170+
163171{% - if salt ['pillar.get' ]('haproxy:resolvers' ) %}
164172
165173
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ haproxy:
9090 503: /etc/haproxy/errors/503.http
9191 504: /etc/haproxy/errors/504.http
9292
93+ httperrors:
94+ corp:
95+ 503: /etc/haproxy/errors/corp/503.http
96+
9397 resolvers:
9498 local_dns:
9599 options:
@@ -171,6 +175,9 @@ haproxy:
171175 - scheme https if !{ ssl_fc }
172176 reqadds:
173177 - "X-Forwarded-Proto:\\ http"
178+ httpresponses:
179+ - return:
180+ - status 503 errorfiles corp if { status 503 }
174181 default_backend: www-backend
175182
176183 # www-https:
You can’t perform that action at this time.
0 commit comments