[
https://issues.apache.org/jira/browse/CAMEL-24455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109196#comment-18109196
]
Claus Ibsen commented on CAMEL-24455:
-------------------------------------
Fixed via https://github.com/apache/camel/pull/25833 (commit 7abf13b2b314).
Resolving to sync JIRA status with the merged fix.
_Claude Code on behalf of Claus Ibsen_
> camel-platform-http - any path starting with "proxy" selects HTTP proxy mode
> ----------------------------------------------------------------------------
>
> Key: CAMEL-24455
> URL: https://issues.apache.org/jira/browse/CAMEL-24455
> Project: Camel
> Issue Type: Bug
> Components: camel-platform-http
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> {{PlatformHttpEndpoint.isHttpProxy()}} tests {{path.startsWith(PROXY_PATH)}}
> where {{PROXY_PATH = "proxy"}}, rather than comparing for equality. Any
> endpoint whose path begins with those five characters - {{proxyStats}},
> {{proxy-health}}, {{proxying}} - is treated as the documented
> {{platform-http:proxy}} endpoint.
> The consequences chain: {{getPath()}} returns {{"/"}} for such an endpoint,
> making it a catch-all, and {{VertxPlatformHttpConsumer.handleProxy()}} sets
> {{Exchange.HTTP_HOST}} from the request's own {{Host}} header so that a
> bridging producer forwards there.
> A route author naming an endpoint {{proxyStats}} therefore gets a catch-all
> whose forward target comes from the caller, which is not what the name
> suggests.
> Proposal: compare the path for equality with {{PROXY_PATH}} (allowing a
> leading slash), so proxy mode is selected only by the documented path. Needs
> an upgrade-guide entry for anyone relying on the prefix match.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)