CAMEL-24625: camel-platform-http-starter - wire up stripUriPrefix consumer option - #1940
Open
Croway wants to merge 2 commits into
Open
CAMEL-24625: camel-platform-http-starter - wire up stripUriPrefix consumer option#1940Croway wants to merge 2 commits into
Croway wants to merge 2 commits into
Conversation
…sumer option The platform-http consumer option stripUriPrefix (added to PlatformHttpEndpoint in apache/camel via CAMEL-24625 / apache/camel#26114) was a no-op on the Spring Boot (servlet) platform-http engine: nothing stripped the registered consumer path from CamelHttpPath. Wire it up in SpringBootPlatformHttpConsumer, mirroring the Vert.x engine, so that combined with the http producer's bridgeEndpoint option a platform-http route becomes a path-based reverse proxy: from("platform-http:/reverse-proxy?matchOnUriPrefix=true&stripUriPrefix=true") .to("http://backend?bridgeEndpoint=true") // /reverse-proxy/get -> http://backend/get Only CamelHttpPath is rewritten; CamelHttpUri/CamelHttpUrl are left untouched.
Drop the duplicate servlet-context-path test class and the two extra scenarios in favor of one end-to-end integration test covering the reverse-proxy usecase (stripUriPrefix + matchOnUriPrefix + bridgeEndpoint).
davsclaus
approved these changes
Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes CAMEL-24625. The Spring Boot (servlet) platform-http engine ignored the
stripUriPrefixconsumer option (added for the Vert.x engine in apache/camel#26114), so the reverse-proxy pattern did not work:Change
SpringBootPlatformHttpConsumer: whenstripUriPrefix=true, strip the consumer path fromCamelHttpPathbefore routing (usingHttpHelper.stripUriPrefix).Test
/reverse-proxy/getreaches the backend as/get.Claude Code on behalf of Croway