Wang1rrr opened a new issue, #7008:
URL: https://github.com/apache/rocketmq-dashboard/issues/7008

   ## Bug
   The data-source connectivity probe and range-query client append the API 
endpoint to the entire configured URL. For a base URL such as 
`https://metrics.example/tenant%20one/?tenant=a%2Fb+%26`, the endpoint becomes 
part of the tenant query value instead of the path. A fragment has the same 
problem. The connectivity probe additionally double-encodes existing percent 
escapes, including a path-only base URL.
   
   ## Reproduction
   On rocketmq-studio at c34535db, configure a Prometheus-compatible source 
with a path prefix and query parameter. Capture the connectivity request and a 
range-query request using a local HTTP fixture.
   
   - Expected range target: `/tenant%20one/api/v1/query_range?tenant=a%2Fb+%26`.
   - Actual range target: `/tenant%20one/?tenant=a%2Fb+%26/api/v1/query_range`.
   - Expected connection target: 
`/tenant%20one/api/v1/query?tenant=a%2Fb+%26&query=up`.
   - Actual connection target: 
`/tenant%2520one/?tenant=a%252Fb+%2526/api/v1/query&query=up`.
   
   This prevents querying data sources behind gateways that use URL parameters 
or encoded path prefixes. Eight regression cases cover both request paths, raw 
query escapes, a query value ending in `/`, and fragments; seven fail before 
the fix. The range tests use an embedded HTTP server and the probe tests use 
Spring's request matcher.
   
   ## Expected behavior
   Append the backend-specific endpoint to the URI path, preserve the raw query 
and path encoding, and append the connection probe's `query=up` separately. 
Keep the existing host validation.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to