Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic proxy upstream #298

Open
johnnypea opened this issue Mar 11, 2025 · 1 comment
Open

Dynamic proxy upstream #298

johnnypea opened this issue Mar 11, 2025 · 1 comment

Comments

@johnnypea
Copy link

Is something like this possible, please?

{
    layer4 {
        :80 {
            @site http host *.caddy.example.com
            route @site {
                subroute {
                    @insecure http
                    route @insecure {
                        proxy {labels.3}.incus:80
                    }
                }
            }
        }
    }
}

How can I match part of the domain and use it in proxy directive?

@vnxme
Copy link
Collaborator

vnxme commented Mar 24, 2025

I think, you can use vars_regexp with {http.request.host} of the mainline Caddy instead, and you may do without caddy-l4 at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants