bitflicker64 commented on code in PR #3431:
URL: https://github.com/apache/hugegraph/pull/3431#discussion_r4409505466
##########
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/ProfileAPI.java:
##########
@@ -108,15 +108,17 @@ public String showAllAPIs(@Context Application
application) {
Resource resource = Resource.from(clazz);
APICategory apiCategory = APICategory.parse(resource.getName());
- String url = resource.getPath();
+ // Return origin-relative paths, not paths relative to /apis/.
+ String url = "/" + StringUtils.strip(resource.getPath(), "/");
Review Comment:
Important: Grizzly mounts the app under the path in `restserver.url`, so
with `http://host:8080/hg` the index returns `/gremlin` while the route is
`/hg/gremlin`; the relative entries this replaces resolved correctly from
`/hg/apis`. Prefix each entry with `uriInfo.getBaseUri().getPath()` and add a
`ProfileAPITest` case with a non-root base URI.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]