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:
+2
-2
@@ -162,13 +162,13 @@ func (c *Crawler) RecordClick(code string, r *http.Request) error {
|
||||
}
|
||||
|
||||
// GetShortURLForPost returns the short URL string for use in posts
|
||||
// Format: https://app.1440.news/r/{code}
|
||||
// Format: https://url.1440.news/{code}
|
||||
func (c *Crawler) GetShortURLForPost(originalURL string, itemID *int64, feedURL string) (string, error) {
|
||||
shortURL, err := c.CreateShortURL(originalURL, itemID, feedURL)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return fmt.Sprintf("https://app.1440.news/r/%s", shortURL.Code), nil
|
||||
return fmt.Sprintf("https://url.1440.news/%s", shortURL.Code), nil
|
||||
}
|
||||
|
||||
// GetClickStats returns click statistics for a short URL
|
||||
|
||||
Reference in New Issue
Block a user