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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user