1. My Caddy version (caddy version
):
2.0
d. My complete Caddyfile or JSON config:
{
"apps": {
"http": {
"servers": {
"myserver":{
"listen":[":443"],
"routes":[{
"match":[
{
"host": ["*.mylodocs-dev.com"]
}
],
"handle": [
{
"handler":"rewrite",
"uri": "/subdomain{http.request.uri}"
}]
}]
}
}
}
}
}
3. The problem I’m having:
I’m trying to extract the subdomain from the host in my json config. and use that to append to a path.
Is that possible. For example i want to take subdomain.mylodocs-dev.com
and then proxy that to someotherurl.com/subdomain
. I’m trying to make it so that I can only have one route and it doesn’t matter what the subdomain is.