fix CORS policy

This commit is contained in:
Jeff Emmett 2024-12-07 12:58:46 -05:00
parent 02124ce920
commit 3a2a38c0b6
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ const { preflight, corsify } = cors({
// 10.*.*.* with any port // 10.*.*.* with any port
/^http:\/\/10\.\d+\.\d+\.\d+:\d+$/, /^http:\/\/10\.\d+\.\d+\.\d+:\d+$/,
// Production domain // Production domain
/^https:\/\/jeffemmett\.com$/ /^https:\/\/jeffemmett\.com$/,
/^https:\/\/www\.jeffemmett\.com$/,
// Worker domain
/^https:\/\/jeffemmett-canvas\.jeffemmett\.workers\.dev$/
] ]
// Check if origin matches any of our patterns // Check if origin matches any of our patterns