Skip to content

Proxito: serve multiple projects under one domain by path#13140

Draft
ericholscher wants to merge 1 commit into
claude/nifty-keller-0nfkbafrom
claude/nifty-keller-0nfkba-domain-by-path
Draft

Proxito: serve multiple projects under one domain by path#13140
ericholscher wants to merge 1 commit into
claude/nifty-keller-0nfkbafrom
claude/nifty-keller-0nfkba-domain-by-path

Conversation

@ericholscher

@ericholscher ericholscher commented Jun 18, 2026

Copy link
Copy Markdown
Member

Why

A customer wants to host many projects under a single path on their own company domain (e.g. https://example.com/docs/<project>/…) but can't point that DNS at us. Today the only way to serve several projects under one domain by path is to model them as subprojects of a parent project. That works, but it forces customers to bend their project layout into a parent/child tree they don't otherwise want, and inherits subproject limitations.

This is a draft / RFC exploring the alternative: serve projects under a domain by path without a subproject relationship.

What

Adds a SERVE_PROJECTS_BY_PATH feature on the domain's project. When enabled, the unresolver matches the leading path segment to a project by slug (mirroring how _match_subproject works, but without a ProjectRelationship), so example.com/<subproject-prefix>/<project-slug>/… resolves directly.

  • Reuses custom_subproject_prefix as the mount prefix (defaults to /projects/).
  • Checked after subprojects, so existing subproject routing keeps precedence.
  • Scoped to projects that share an owner with the domain's project, so a domain can't expose unrelated projects. No migration needed (feature_id has no DB-level choices).

Combine with X-RTD-Slug (RESOLVE_PROJECT_FROM_HEADER) so the customer's reverse proxy can identify the domain's project without DNS, and with the prefix work in the base PR so /_/ paths stay under the proxied path.

Open questions for reviewers

  • Scoping: shared-owner is a placeholder. On .com this should almost certainly be organization-scoped (or an explicit allowlist on the domain), not owner-overlap.
  • Mount prefix: is reusing custom_subproject_prefix the right knob, or should this be a dedicated field on Domain/the project?
  • Modeling: should "projects served under this domain" be an explicit relation rather than a global slug lookup?

This is stacked on #13139 (un-prefix /_/ in nginx); review that first.


🤖 Draft generated by Claude Code (AI agent), for review.

Add a SERVE_PROJECTS_BY_PATH feature that lets a single domain serve other
projects under a path prefix (e.g. example.com/docs/<project-slug>/) without
modeling each one as a subproject. The unresolver matches the leading path
segment to a project by slug, scoped to projects that share an owner with the
domain's project so unrelated projects can't be exposed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VPEKF2tcrc5DqDLMsdkNUz
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.

2 participants