Get the wildcard subdomain to reverse proxy


I am trying to build a CI with drone and I would like to do something like this:

*.my.domain {
reverse_proxy local-branch-$SUBDOMAIN:3000

So for example should point to local-branch-staging:3000. Is there anyway to do that or should I build the caddyfile everytime something’s deployed?

You can use {labels.2} to get the 2-indexed segment of the domain, from the right.

Next time, please fill out the help topic template, as per the forum rules.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.