From c00120a85c2126d1799299d17a9cde0081e7797e Mon Sep 17 00:00:00 2001 From: Omar Najjar Date: Wed, 30 Apr 2025 19:45:50 +1000 Subject: [PATCH] Revert "x" This reverts commit 58f39fb3527633cd65bd92810c8549860cc8b0c9. --- wrangler.toml | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/wrangler.toml b/wrangler.toml index f7100ef..b9ff90a 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -18,22 +18,20 @@ bucket_name = "memes" binding = "ASSETS" bucket_name = "assets" -# Environment variables +# Environment variables (optional) [vars] ENVIRONMENT = "production" -# Add CORS_ALLOWED_ORIGINS if you want to restrict origins -# CORS_ALLOWED_ORIGINS = "theradicalparty.com,*.theradicalparty.com,localhost:*" -# Enhanced logging for troubleshooting +# wrangler.toml (wrangler v3.88.0^) [observability.logs] enabled = true -level = "debug" -# Routes configuration +# 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" @@ -42,42 +40,15 @@ zone_name = "theradicalparty.com" 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/" -zone_name = "theradicalparty.com" - -# Explicitly add route for index.html -[[routes]] -pattern = "theradicalparty.com/index.html" -zone_name = "theradicalparty.com" - -# Add route for login page -[[routes]] -pattern = "theradicalparty.com/login" -zone_name = "theradicalparty.com" - -# Add route for manifest -[[routes]] -pattern = "theradicalparty.com/manifest.webmanifest" -zone_name = "theradicalparty.com" - -# Configure CORS headers in wrangler.toml -[http_handlers] -[http_handlers.headers] -"Access-Control-Allow-Origin" = "*" -"Access-Control-Allow-Methods" = "GET, POST, PUT, DELETE, OPTIONS" -"Access-Control-Allow-Headers" = "Content-Type, Authorization, Accept, Cache-Control" -"Access-Control-Max-Age" = "86400" - -# Pages integration if you're using Cloudflare Pages +# Pages integration [pages] build_command = "npm run build" build_output_dir = "dist" -# Triggers - useful if you need scheduled or cron jobs -[triggers] -crons = [] \ No newline at end of file + +