How to combine proxies which diff "from" and same "to"?

image

As the screenshot, if I proxy more path to “backend:5000”, I must write more “proxy block”.

Is it possible combine them into one block like this ?

proxy /api /payment /xxx /yyy backend:5000 {
    transparent
}

I’m afraid not.

If it’s a truly excessive amount of endpoints, you might look into generating your Caddyfile programmatically.

Thank you, I will consider it…