diff --git a/readme-vars.yml b/readme-vars.yml index d52b2a9..f5cc6a2 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -471,6 +471,7 @@ full_custom_readme: | ## Versions + * **29.11.26:** - Container attach's WebSocket form (`/containers/{id}/attach/ws`) now needs `POST=1`, like its `POST` form. * **05.10.26:** - Add `TIMEOUT_CLIENT` & `TIMEOUT_SERVER` options. * **18.08.26:** - Add `ALLOW_ARCHIVE`, `ALLOW_CHANGES`, `ALLOW_EXPORT`, `ALLOW_LOGS`, `ALLOW_TOP` options. * **15.06.26:** - Rebase to Alpine 3.24. diff --git a/root/templates/haproxy.cfg b/root/templates/haproxy.cfg index 1932e16..a6b7004 100644 --- a/root/templates/haproxy.cfg +++ b/root/templates/haproxy.cfg @@ -44,6 +44,10 @@ frontend proxy http-request deny if { path,url_dec -m reg -i ^(/v[\d\.]+)?(/libpod)?/(containers|pods)/[a-zA-Z0-9_.-]+/(pause) } !allow_pause http-request deny if { path,url_dec -m reg -i ^(/v[\d\.]+)?(/libpod)?/containers/[a-zA-Z0-9_.-]+/(exec) } !allow_exec + # attach can write to a container's stdin and replay its log, so it needs POST=1 + # even in its GET (WebSocket) form, /containers/{id}/attach/ws + http-request deny if { path,url_dec -m reg -i ^(/v[\d\.]+)?(/libpod)?/containers/[a-zA-Z0-9_.-]+/attach } !{ env(POST) -m bool } + # Docker's archive extraction endpoint only consumes tar request bodies when # their media type is application/x-tar. Supply the documented media type # when clients omit Content-Type rather than forwarding a request that the