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

rewrite: Don't add / in Caddyfile, do it after replacer #6662

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

francislavoie
Copy link
Member

Context: https://caddy.community/t/unable-to-use-map-variables-with-url-strip-prefix/26093/2

The problem is if the input to the Caddyfile is a placeholder whose value will start with a / (e.g. {foo} = /foo), then it would cause {foo} to become /{foo} after the adapter, then later //foo once replaced.

We should add the / if missing at runtime after running the replacer, if necessary.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Oct 24, 2024
@mholt mholt merged commit 5823ecc into master Nov 5, 2024
33 checks passed
@mholt mholt deleted the strip-prefix-fix branch November 5, 2024 17:15
@mholt
Copy link
Member

mholt commented Nov 5, 2024

Thank you!

@mholt mholt added this to the v2.9.0-beta.3 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants