forked from mtusi2026/mtusi2026lab7
32 lines
973 B
INI
32 lines
973 B
INI
global
|
|
maxconn 1024
|
|
stats socket /tmp/haproxy.sock mode 600 level admin
|
|
ssl-default-bind-options ssl-min-ver TLSv1.2
|
|
ssl-default-server-options ssl-min-ver TLSv1.2
|
|
|
|
defaults
|
|
mode http
|
|
timeout connect 1s
|
|
timeout client 125s
|
|
timeout server 125s
|
|
timeout check 1s
|
|
retries 0
|
|
|
|
resolvers docker
|
|
nameserver dns 127.0.0.11:53
|
|
hold valid 1s
|
|
hold obsolete 1s
|
|
|
|
frontend public
|
|
bind :8443 ssl crt /run/identity/bundle.pem
|
|
http-request deny deny_status 404 if { path_beg /internal }
|
|
http-request set-header X-Forwarded-For %[src]
|
|
default_backend api
|
|
|
|
backend api
|
|
balance roundrobin
|
|
option httpchk
|
|
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api
|
|
http-check expect status 200
|
|
server-template replica 1-4 api:8080 ssl verify required ca-file /run/identity/ca.crt crt /run/identity/bundle.pem verifyhost api sni str(api) check inter 1s fall 2 rise 1 resolvers docker init-addr none
|