Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| private static URI buildUri(String baseUrl, String path) { | ||
| String normalizedBase = ensureScheme(baseUrl); | ||
| String normalizedPath = (path == null || path.isEmpty()) ? "/" : (path.startsWith("/") ? path : "/" + path); | ||
| return URI.create(normalizedBase).resolve(normalizedPath); |
There was a problem hiding this comment.
[P1] Preserve base URL paths when resolving request URIs
The new buildUri always prefixes the supplied path with / and feeds it to URI.create(normalizedBase).resolve(normalizedPath). For base URLs that include a non-root path like https://example.com/api, resolve("/items") discards the /api prefix and produces https://example.com/items, whereas the previous baseUrl + path concatenation correctly yielded https://example.com/api/items. Deployments that rely on a path segment in phoenixd.base_url will now send every request to the wrong endpoint. Consider resolving a relative path (without the leading slash) or concatenating after normalizing the scheme so the base path is preserved.
Useful? React with 👍 / 👎.
No description provided.