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
|
# Wildcard subdomain router for tenant subdomains
|
||||||
# Each subdomain gets its own certificate via HTTP challenge
|
# Each subdomain gets its own certificate via HTTP challenge
|
||||||
|
# Routes to nginx which serves the frontend SPA and proxies /api/ to Django
|
||||||
subdomain-router:
|
subdomain-router:
|
||||||
rule: 'HostRegexp(`{subdomain:[a-z0-9-]+}.smoothschedule.com`)'
|
rule: 'HostRegexp(`{subdomain:[a-z0-9-]+}.smoothschedule.com`)'
|
||||||
entryPoints:
|
entryPoints:
|
||||||
- web-secure
|
- web-secure
|
||||||
middlewares:
|
middlewares:
|
||||||
- csrf
|
- csrf
|
||||||
service: django
|
service: nginx
|
||||||
tls:
|
tls:
|
||||||
certResolver: letsencrypt
|
certResolver: letsencrypt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user