1. Output of v2.6.2
:
2. How I run Caddy:
a. System environment:
Win11 x64
b. Command:
caddy fmt --overwrite
caddy run --config ./Caddyfile
c. Service/unit/compose file:
none
d. My complete Caddy config:
http://localhost:5200 {
@postandget {
method POST PUT GET
path /test/*
}
reverse_proxy @postandget {
# why not the rewrite not support <matcher> only <to>
# i want http://localhost:5203/test/* => http://localhost:5203/*
rewrite ????
header_up host {http.reverse_proxy.upstream.host}
to http://localhost:5203 http://localhost:5204
}
}
3. The problem I’m having:
i want to change url from http://localhost:5203/test/* => http://localhost:5203/*
i dont want to use handle or uri or route,they make the code looks complicated.
Is there any other simpler way to make this work?