Browse Source

fix: support multi-level subdomains in CORS (#11664)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
pull/11672/head
afc163 5 months ago
committed by GitHub
parent
commit
ef3bf207d8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      cloudflare-worker/src/utils/cors.ts

4
cloudflare-worker/src/utils/cors.ts

@ -1,6 +1,6 @@
const allowedPatterns = [
/^https:\/\/[\w-]+\.surge\.sh$/,
/^https:\/\/[\w-]+\.pages\.dev$/,
/^https:\/\/.*\.surge\.sh$/,
/^https:\/\/.*\.pages\.dev$/,
/^https:\/\/preview\.pro\.ant\.design$/,
/^http:\/\/localhost:\d+$/,
];

Loading…
Cancel
Save