Skip to content

caddyhttp: Add {?query} placeholder - #6714

Merged
francislavoie merged 3 commits into
masterfrom
prefixed-query
Dec 2, 2024
Merged

francislavoie merged 3 commits into
masterfrom
prefixed-query

Conversation

@francislavoie

@francislavoie francislavoie commented Nov 28, 2024 •

Copy link
Copy Markdown
Member

This is a two in one:

@francislavoie francislavoie added bug 🐞 Something isn't working feature ⚙️ New feature or request labels Nov 28, 2024
@francislavoie francislavoie added this to the v2.9.0-beta.4 milestone Nov 28, 2024
@francislavoie francislavoie changed the title caddyhttp: Add {prefixed_query} placeholder caddyhttp: Add {prefixed_query} placeholder Nov 28, 2024

@whitestrake whitestrake left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and tested real quick - looks like this has handily fixed the repro I found in https://caddy.community/t/preserving-query-string-during-rewrite/26538/4

LGTM!

@gingerbeardman

gingerbeardman commented Nov 28, 2024 •

Copy link
Copy Markdown

Thanks for fixing the bug I stumbled across!

@mholt

mholt commented Nov 28, 2024

Copy link
Copy Markdown
Member

Hear me out for a sec, what if it was named {?query}?

@francislavoie

Copy link
Copy Markdown
Member Author

Hmmmmmmmmmmmmmm... well nothing else we have currently has special chars in the placeholder. Maybe we do that only for the Caddyfile shortcut?

@francislavoie francislavoie changed the title caddyhttp: Add {prefixed_query} placeholder caddyhttp: Add {?query} placeholder Nov 28, 2024
@mholt

mholt commented Dec 1, 2024

Copy link
Copy Markdown
Member

Yeah, for the Caddyfile shortcut at least would be nice 👍

@francislavoie

Copy link
Copy Markdown
Member Author

Yep already done @mholt 😅

@francislavoie
francislavoie merged commit b116dce into master Dec 2, 2024
@francislavoie
francislavoie deleted the prefixed-query branch December 2, 2024 13:06
@BrewTestBot BrewTestBot mentioned this pull request Dec 31, 2024
1 task done
mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
* caddyhttp: Add `{prefixed_query}` placeholder

* fastcgi: Preserve query during canonical redirect

* Use orig_uri instead for the redirect, shorter Caddyfile shortcut
@mohammed90 mohammed90 mentioned this pull request Oct 25, 2025
46 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working feature ⚙️ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Query placeholder that includes ?

4 participants