mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
refactor: extract url helpers, add EMAIL_DOMAIN support
- Add src/utils/urls.ts with baseUrl, feedRssUrl, feedAtomUrl, feedUrl, feedEmailAddress, feedTopicPattern - Add optional EMAIL_DOMAIN env var so web domain and email domain can differ (e.g. demo.kill-the.news serves feeds, @kill-the.news receives mail) - Replace all inline domain template literals with the new helpers - Remove unused site_url/feed_url fields from FeedConfig - Remove unused feedPath param from fetchFeedData - Extract verifyCallback() to deduplicate verifyAndStoreSubscription / verifyAndDeleteSubscription Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,11 @@ invocation_logs = true
|
||||
|
||||
# Global Environment variables
|
||||
[vars]
|
||||
DOMAIN = "REPLACE_WITH_YOUR_DOMAIN" # Your custom domain for emails
|
||||
DOMAIN = "REPLACE_WITH_YOUR_DOMAIN" # Web domain (used for feed URLs and admin UI)
|
||||
|
||||
# Optional: email domain when it differs from the web domain
|
||||
# Example: DOMAIN = "demo.example.com" but emails are @example.com
|
||||
# EMAIL_DOMAIN = "REPLACE_WITH_YOUR_EMAIL_DOMAIN"
|
||||
|
||||
# Optional: size-based feed trimming threshold in bytes (default: 524288 = 512 KB)
|
||||
# FEED_MAX_SIZE_BYTES = "524288"
|
||||
@@ -83,6 +87,7 @@ routes = [
|
||||
|
||||
[env.demo.vars]
|
||||
DOMAIN = "demo.kill-the.news"
|
||||
EMAIL_DOMAIN = "kill-the.news" # Optional: email domain when it differs from the web domain
|
||||
|
||||
# Nightly reset: wipe all KV data at 03:00 UTC so the demo stays clean
|
||||
[env.demo.triggers]
|
||||
|
||||
Reference in New Issue
Block a user