Repository navigation
fix(dashboard): include OMNIROUTE_BASE_PATH in displayed API base URL - #8514
Merged
diegosouzapw merged 3 commits intoJul 26, 2026
Merged
diegosouzapw merged 3 commits into
diegosouzapw merged 3 commits into
Conversation
When OmniRoute is served under a reverse-proxy subpath (OMNIROUTE_BASE_PATH), the Endpoints UI built display URLs from window.location.origin alone and appended /v1, producing https://host/v1 instead of https://host/omniroute/v1. - Prefer NEXT_PUBLIC_BASE_URL when it already includes a non-root path - Append NEXT_PUBLIC_OMNIROUTE_BASE_PATH (mirrored from OMNIROUTE_BASE_PATH at build time) when resolving a bare public origin - Document subpath display behavior in .env.example - Add unit coverage for basePath-aware resolution
7 tasks
diegosouzapw
merged commit Jul 26, 2026
8115867
into
cheaper-inference:release/v3.8.49
5 checks passed
diegosouzapw
pushed a commit
that referenced
this pull request
Jul 26, 2026
…KUP_SCHEDULE_JOB_INTERVAL_MS (#8690) Both vars were introduced in code without a .env.example / ENVIRONMENT.md entry, so `check:env-doc-sync` (docs-sync-strict / docs-gates) went red on release/v3.8.49 with "In code but missing from .env.example: 2": - NEXT_PUBLIC_OMNIROUTE_BASE_PATH — src/shared/hooks/useDisplayBaseUrl.ts (#8514) - OMNIROUTE_BACKUP_SCHEDULE_JOB_INTERVAL_MS — src/lib/jobs/backupScheduleJob.ts (#8517) Documents both in .env.example and docs/reference/ENVIRONMENT.md rather than adding allowlist entries: both are real operator-tunable knobs, so the allowlist would hide a genuine gap. Refs #8540 Co-authored-by: rqzbeh <rqzbeh@users.noreply.github.com> Co-authored-by: maxmad64bis <maxmad64bis@users.noreply.github.com>
Merged
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…cheaper-inference#8514) * fix(dashboard): include OMNIROUTE_BASE_PATH in displayed API base URL When OmniRoute is served under a reverse-proxy subpath (OMNIROUTE_BASE_PATH), the Endpoints UI built display URLs from window.location.origin alone and appended /v1, producing https://host/v1 instead of https://host/omniroute/v1. - Prefer NEXT_PUBLIC_BASE_URL when it already includes a non-root path - Append NEXT_PUBLIC_OMNIROUTE_BASE_PATH (mirrored from OMNIROUTE_BASE_PATH at build time) when resolving a bare public origin - Document subpath display behavior in .env.example - Add unit coverage for basePath-aware resolution * docs(changelog): add fragment for cheaper-inference#8514 display basePath fix --------- Co-authored-by: rqzbeh <rqzbeh@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…KUP_SCHEDULE_JOB_INTERVAL_MS (cheaper-inference#8690) Both vars were introduced in code without a .env.example / ENVIRONMENT.md entry, so `check:env-doc-sync` (docs-sync-strict / docs-gates) went red on release/v3.8.49 with "In code but missing from .env.example: 2": - NEXT_PUBLIC_OMNIROUTE_BASE_PATH — src/shared/hooks/useDisplayBaseUrl.ts (cheaper-inference#8514) - OMNIROUTE_BACKUP_SCHEDULE_JOB_INTERVAL_MS — src/lib/jobs/backupScheduleJob.ts (cheaper-inference#8517) Documents both in .env.example and docs/reference/ENVIRONMENT.md rather than adding allowlist entries: both are real operator-tunable knobs, so the allowlist would hide a genuine gap. Refs cheaper-inference#8540 Co-authored-by: rqzbeh <rqzbeh@users.noreply.github.com> Co-authored-by: maxmad64bis <maxmad64bis@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…cheaper-inference#8514) * fix(dashboard): include OMNIROUTE_BASE_PATH in displayed API base URL When OmniRoute is served under a reverse-proxy subpath (OMNIROUTE_BASE_PATH), the Endpoints UI built display URLs from window.location.origin alone and appended /v1, producing https://host/v1 instead of https://host/omniroute/v1. - Prefer NEXT_PUBLIC_BASE_URL when it already includes a non-root path - Append NEXT_PUBLIC_OMNIROUTE_BASE_PATH (mirrored from OMNIROUTE_BASE_PATH at build time) when resolving a bare public origin - Document subpath display behavior in .env.example - Add unit coverage for basePath-aware resolution * docs(changelog): add fragment for cheaper-inference#8514 display basePath fix --------- Co-authored-by: rqzbeh <rqzbeh@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…KUP_SCHEDULE_JOB_INTERVAL_MS (cheaper-inference#8690) Both vars were introduced in code without a .env.example / ENVIRONMENT.md entry, so `check:env-doc-sync` (docs-sync-strict / docs-gates) went red on release/v3.8.49 with "In code but missing from .env.example: 2": - NEXT_PUBLIC_OMNIROUTE_BASE_PATH — src/shared/hooks/useDisplayBaseUrl.ts (cheaper-inference#8514) - OMNIROUTE_BACKUP_SCHEDULE_JOB_INTERVAL_MS — src/lib/jobs/backupScheduleJob.ts (cheaper-inference#8517) Documents both in .env.example and docs/reference/ENVIRONMENT.md rather than adding allowlist entries: both are real operator-tunable knobs, so the allowlist would hide a genuine gap. Refs cheaper-inference#8540 Co-authored-by: rqzbeh <rqzbeh@users.noreply.github.com> Co-authored-by: maxmad64bis <maxmad64bis@users.noreply.github.com>
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.
Summary
When OmniRoute is deployed behind a reverse proxy under a subpath (
OMNIROUTE_BASE_PATH=/omniroute), the dashboard Endpoints page builds curl/API examples as:https://host/v1instead of:
https://host/omniroute/v1Root cause:
useDisplayBaseUrlpreferredwindow.location.origin(no path) and appended/v1, ignoring Next.jsbasePath/OMNIROUTE_BASE_PATH.Changes
resolveDisplayBaseUrl: keep a configured public URL that already includes a path; otherwise append the deploy basePath when resolving a public browser origin.next.config.mjs: mirrorOMNIROUTE_BASE_PATH→NEXT_PUBLIC_OMNIROUTE_BASE_PATHso the client bundle can read it after build..env.example: document subpath display + rebuild requirement.normalizeBasePath.Test plan
OMNIROUTE_BASE_PATH): Endpoints still showhttps://host/v1OMNIROUTE_BASE_PATH=/omniroute, rebuild): Endpoints showhttps://host/omniroute/v1NEXT_PUBLIC_BASE_URL=https://host/omniroute: display keeps the path even whenwindow.location.originis barehttps://hostvitest run src/shared/hooks/__tests__/useDisplayBaseUrl.test.tsxNotes
This is display-only (curl snippets / endpoint cards). Absolute client
fetch("/api/...")under basePath remains a separate concern often handled at the reverse proxy; this PR does not change authz or routing.