* 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 #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>
* fix(dashboard): prefer public endpoint URLs
* docs: add changelog fragment for #7547
* test(dashboard): cover onboarding public endpoint
* refactor(hooks): split display-URL predicates below complexity gate
Decompose isPrivateIpv4 and isPublicDisplayBaseUrl (both over the ESLint
complexity gate of 15) into small named predicates. Behavior is unchanged:
- isPrivateIpv4 now checks a PRIVATE_IPV4_RANGES table (RFC1918 +
special-use ranges) through isInIpv4Range instead of one long chain
of ||/&& comparisons.
- isPublicDisplayBaseUrl now delegates to isSupportedProtocol,
isLoopbackHostname, isMulticastDnsHostname and isNonPublicIpv6 (itself
split into isIpv6LoopbackOrUnspecified / isIpv6UniqueLocal /
isIpv6LinkLocal), preserving the isIpv6 gate so hostnames that merely
start with "fc"/"fd" (e.g. fdroid.example.com) are not misclassified
as IPv6 unique-local addresses.
Adds IPv4 range-boundary and IPv6-gate regression tests; all existing
assertions are unchanged.
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
---------
Co-authored-by: nguyenha935 <208228297+nguyenha935@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>