Skip to content

Commit bfa9a7a

Browse files
committed
Fix CORS headers and wrangler.toml configuration
- Fixed wrangler.toml routes configuration for custom domains - Enhanced CORS headers to match nginx configuration - Added current branch to deploy.yaml for staging deployment - Removed Access-Control-Allow-Credentials to fix security issue with wildcard origin
1 parent ac74b6c commit bfa9a7a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- master
77
- dev
8+
- fix-cloudflare-deployment-scripts-update
89

910
concurrency:
1011
group: ${{ github.workflow }}-${{ github.ref }}
@@ -22,7 +23,7 @@ jobs:
2223
export ENV=production
2324
fi
2425
25-
if [ "${{ github.ref_name }}" == "dev" ]; then
26+
if [ "${{ github.ref_name }}" == "dev" ] || [ "${{ github.ref_name }}" == "fix-cloudflare-deployment-scripts-update" ]; then
2627
export ENV=staging
2728
fi
2829

src/generateWorker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ const corsHeaders = {
4141
"Access-Control-Allow-Origin": "*",
4242
"Access-Control-Allow-Methods": "GET, HEAD, POST, OPTIONS",
4343
"Access-Control-Allow-Headers": "Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range",
44-
"Access-Control-Allow-Credentials": "true",
45-
"Access-Control-Max-Age": "1728000",
44+
"Access-Control-Max-Age": "86400", // 24 hours
4645
};
4746
4847
// Auto-generated file mapping based on build directory contents

0 commit comments

Comments
 (0)