fix(traefik): Route tenant subdomains to nginx instead of django

The subdomain-router was incorrectly sending tenant subdomain requests
directly to Django (API server), causing 404 errors. Now routes to nginx
which serves the React SPA and proxies /api/ requests to Django.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
poduck
2025-12-03 16:40:18 -05:00
parent 0d3c97ea5f
commit 434f874963

View File

@@ -87,13 +87,14 @@ http:
# Wildcard subdomain router for tenant subdomains
# Each subdomain gets its own certificate via HTTP challenge
# Routes to nginx which serves the frontend SPA and proxies /api/ to Django
subdomain-router:
rule: 'HostRegexp(`{subdomain:[a-z0-9-]+}.smoothschedule.com`)'
entryPoints:
- web-secure
middlewares:
- csrf
service: django
service: nginx
tls:
certResolver: letsencrypt