1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-11-27 10:28:18 +00:00

Support any API version prefix

This commit is contained in:
Jairo Llopis 2017-03-29 13:11:26 +02:00
parent 17ff117058
commit 53d9ee0732

View File

@ -42,24 +42,24 @@ backend dockerbackend
frontend dockerfrontend frontend dockerfrontend
bind :2375 bind :2375
http-request deny unless METH_GET || { env(POST) -m bool } http-request deny unless METH_GET || { env(POST) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/auth } ! { env(AUTH) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/auth } ! { env(AUTH) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/build } ! { env(BUILD) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/build } ! { env(BUILD) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/commit } ! { env(COMMIT) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/commit } ! { env(COMMIT) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/containers } ! { env(CONTAINERS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/containers } ! { env(CONTAINERS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/events } ! { env(EVENTS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/events } ! { env(EVENTS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/exec } ! { env(EXEC) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/exec } ! { env(EXEC) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/images } ! { env(IMAGES) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/images } ! { env(IMAGES) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/info } ! { env(INFO) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/info } ! { env(INFO) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/networks } ! { env(NETWORKS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/networks } ! { env(NETWORKS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/nodes } ! { env(NODES) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/nodes } ! { env(NODES) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/_ping } ! { env(PING) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/_ping } ! { env(PING) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/plugins } ! { env(PLUGINS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/plugins } ! { env(PLUGINS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/post } ! { env(POST) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/post } ! { env(POST) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/secrets } ! { env(SECRETS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/secrets } ! { env(SECRETS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/services } ! { env(SERVICES) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/services } ! { env(SERVICES) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/swarm } ! { env(SWARM) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/swarm } ! { env(SWARM) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/system } ! { env(SYSTEM) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/system } ! { env(SYSTEM) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/tasks } ! { env(TASKS) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/tasks } ! { env(TASKS) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/version } ! { env(VERSION) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/version } ! { env(VERSION) -m bool }
http-request deny if { path_reg ^(/v\d+.\d+)?/volumes } ! { env(VOLUMES) -m bool } http-request deny if { path_reg ^(/v[\d\.]+)?/volumes } ! { env(VOLUMES) -m bool }
default_backend dockerbackend default_backend dockerbackend