feat: serve isolated companies below a fixed product path
All checks were successful
Application acceptance / application-tests (push) Successful in 1m12s
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 25s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
tegwick 2026-09-11 21:29:26 +02:00
parent 09e2239bc6
commit 9345a1bb1a
28 changed files with 350 additions and 117 deletions

View file

@ -0,0 +1,12 @@
import re
from django.core.exceptions import ImproperlyConfigured
def application_path(value):
"""A deployment-owned tenant path, never a value taken from request headers."""
if value in ('', '/'):
return ''
if not re.fullmatch(r'/[a-z0-9]+(?:-[a-z0-9]+)*', value):
raise ImproperlyConfigured('APP_BASE_PATH must be empty or /lowercase-tenant-slug')
return value