Resolves the public app base URL from NEXT_PUBLIC_APP_URL. Use for OAuth redirect URIs and outbound links — not req.nextUrl.origin, which behind a reverse proxy often reflects the internal host (e.g. 0.0.0.0:9624).
NEXT_PUBLIC_APP_URL
req.nextUrl.origin
0.0.0.0:9624
Normalized base URL without a trailing slash.
Resolves the public app base URL from
NEXT_PUBLIC_APP_URL. Use for OAuth redirect URIs and outbound links — notreq.nextUrl.origin, which behind a reverse proxy often reflects the internal host (e.g.0.0.0.0:9624).