Skip to content

Add PROXY_UI_URL for separate UI/package URL advertisement#161

Merged
andrew merged 1 commit into
mainfrom
add-ui-base-url
Jun 7, 2026
Merged

Add PROXY_UI_URL for separate UI/package URL advertisement#161
andrew merged 1 commit into
mainfrom
add-ui-base-url

Conversation

@andrew
Copy link
Copy Markdown
Contributor

@andrew andrew commented Jun 6, 2026

Addresses the dual-URL ask from #123 (comment).

Adds UIBaseURL (env PROXY_UI_URL), advertised separately from BaseURL for deployments where the UI is reached on a public domain (behind auth) while build machines hit a Docker network alias for the package endpoints. Defaults to BaseURL when unset.

Consumers in this PR:

  • Logged alongside base_url at startup.
  • <link rel="canonical"> and og:url / og:title / og:site_name in every UI page, omitted when UIBaseURL is empty.
  • Banner on the install guide when UIBaseURL differs from BaseURL, clarifying that the URLs in the snippets are the package endpoint and that the UI itself lives elsewhere.

BaseURL keeps its existing meaning: the URL that package managers and metadata rewriting use.

Docs also call out the same-port caveat raised in #123 (comment): setting ui_base_url only changes what URL the UI advertises, the listener still serves package endpoints, so any reverse proxy fronting the UI publicly must restrict the public route to PathPrefix(/ui). nginx and Traefik examples in the README show the pattern.

@andrew andrew changed the base branch from ui-prefix to main June 7, 2026 14:46
Adds UIBaseURL (env PROXY_UI_URL), advertised separately from BaseURL
for deployments where the UI is reached on a public domain while build
machines hit a Docker network alias for the package endpoints. Defaults
to BaseURL when unset.

Consumers:
- Logged alongside base_url at startup.
- <link rel="canonical"> and og:url / og:title / og:site_name in every
  UI page, omitted when UIBaseURL is empty.
- Banner on the install guide when UIBaseURL differs from BaseURL,
  clarifying that the URLs in the snippets are the package endpoint and
  that the UI itself lives elsewhere.

Docs call out that the proxy serves UI and package endpoints on the same
listener, so reverse proxies fronting the UI publicly must restrict the
public route to PathPrefix(/ui) to avoid exposing /npm, /pypi, etc.
nginx and Traefik examples both show the path-split pattern.
@andrew andrew force-pushed the add-ui-base-url branch from 5e749db to 386423a Compare June 7, 2026 14:49
@andrew andrew merged commit da4fa2f into main Jun 7, 2026
8 checks passed
@andrew andrew deleted the add-ui-base-url branch June 7, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant