address review

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-08-30 15:13:08 +02:00
parent cac797114a
commit a56fbb6045
5 changed files with 25 additions and 13 deletions

View file

@ -1,3 +1,5 @@
# Inspiration: https://github.com/Tecnativa/docker-socket-proxy/blob/master/haproxy.cfg
defaults
timeout connect 10s
timeout client 10s
@ -8,7 +10,6 @@ frontend http
bind :2375
http-request deny unless { src 127.0.0.1 } || { src ::1 } || { src NC_IPV4_PLACEHOLDER } || { src NC_IPV6_PLACEHOLDER }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((start)|(stop)|(restart)|(kill)) }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/auth }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/images }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/info }