Use url.1440.news for shorter URLs (28 chars vs 32)
- Changed short URL format from app.1440.news/r/{code} to url.1440.news/{code}
- Added Traefik routing for url.1440.news domain
- Root handler checks Host header to route url.1440.news requests
- Legacy /r/ path still supported for backwards compatibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+8
-4
@@ -21,18 +21,22 @@ services:
|
||||
- atproto
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Production: HTTPS with Let's Encrypt
|
||||
# Production: HTTPS with Let's Encrypt for app.1440.news
|
||||
- "traefik.http.routers.app-1440-news.rule=Host(`app.1440.news`)"
|
||||
- "traefik.http.routers.app-1440-news.entrypoints=https"
|
||||
- "traefik.http.routers.app-1440-news.tls.certresolver=letsencrypt-dns"
|
||||
# Production: HTTP to HTTPS redirect
|
||||
- "traefik.http.routers.app-1440-news-redirect.rule=Host(`app.1440.news`)"
|
||||
# Production: HTTPS for url.1440.news (URL shortener)
|
||||
- "traefik.http.routers.url-1440-news.rule=Host(`url.1440.news`)"
|
||||
- "traefik.http.routers.url-1440-news.entrypoints=https"
|
||||
- "traefik.http.routers.url-1440-news.tls.certresolver=letsencrypt-dns"
|
||||
# Production: HTTP to HTTPS redirect for both domains
|
||||
- "traefik.http.routers.app-1440-news-redirect.rule=Host(`app.1440.news`) || Host(`url.1440.news`)"
|
||||
- "traefik.http.routers.app-1440-news-redirect.entrypoints=http"
|
||||
- "traefik.http.routers.app-1440-news-redirect.middlewares=https-redirect"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
|
||||
# Local development: HTTP only
|
||||
- "traefik.http.routers.app-1440-news-local.rule=Host(`app.1440.localhost`)"
|
||||
- "traefik.http.routers.app-1440-news-local.rule=Host(`app.1440.localhost`) || Host(`url.1440.localhost`)"
|
||||
- "traefik.http.routers.app-1440-news-local.entrypoints=http"
|
||||
# Shared service
|
||||
- "traefik.http.services.app-1440-news.loadbalancer.server.port=4321"
|
||||
|
||||
Reference in New Issue
Block a user