Pages was serving index.html (SPA fallback) for these paths because no Worker route existed to intercept them. Worker already has serveSitemap() and the robots.txt inline response — they just weren't being reached. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
1.2 KiB
TOML
61 lines
1.2 KiB
TOML
name = "radical"
|
|
main = "worker.js"
|
|
compatibility_date = "2024-03-31"
|
|
|
|
# D1 Database Binding
|
|
[[d1_databases]]
|
|
binding = "DB" # Use this name in your code
|
|
database_name = "radical-db"
|
|
database_id = "1f2a5273-bfcb-45c8-a759-5d675c05620c"
|
|
|
|
# R2 Bucket Binding
|
|
[[r2_buckets]]
|
|
binding = "MEMES_BUCKET"
|
|
bucket_name = "memes"
|
|
|
|
# Static Assets Binding
|
|
[[r2_buckets]]
|
|
binding = "ASSETS"
|
|
bucket_name = "assets"
|
|
|
|
# Environment variables (optional)
|
|
[vars]
|
|
ENVIRONMENT = "production"
|
|
|
|
# wrangler.toml (wrangler v3.88.0^)
|
|
[observability.logs]
|
|
enabled = true
|
|
|
|
# Main routes for API endpoints
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/api/*"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
# Media file routes
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/memes/*"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/audio/*"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
# Ensure static assets are properly routed
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/styles.css"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/sitemap.xml"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
[[routes]]
|
|
pattern = "theradicalparty.com/robots.txt"
|
|
zone_name = "theradicalparty.com"
|
|
|
|
# Weekly digest — Monday 9am AEST (Sunday 23:00 UTC)
|
|
[triggers]
|
|
crons = ["0 23 * * SUN"]
|
|
|
|
|
|
|