caddy-docker-proxy
caddy-docker-proxy copied to clipboard
Caddy doesn't handle multiple handle_path labels correctly in Docker
I'm trying to migrate from Docker Flow Proxy to Caddy, and I'm running into an issue when I try to define multiple handle_path labels for the same service in Caddy using Docker labels. When I set multiple paths, only the last one gets applied, and the earlier ones are ignored.
- Steps to reproduce: Define multiple handle_path labels with different paths in the Docker Compose file:
labels:
caddy.handle_path: "/wss/*"
caddy.handle_path: "/ws/*"
Notice that only the last defined path (/ws/) is applied, and the first one (/wss/) is ignored.
-
Expected Behavior: Caddy should handle both paths correctly and apply both /wss/* and /ws/* without ignoring the first one.
-
Actual Behavior: Only the last handle_path label is applied, and the earlier one is ignored.
For reference, here is an example on how Docker Flow Proxy handle multiple paths:
labels:
- com.df.reqPathSearch=/wss/|/ws/
Is there a way to handle multiple paths using Caddy or is it a well known issue?