fix CORS policy

This commit is contained in:
Jeff Emmett 2024-12-07 12:58:46 -05:00
parent 93782549c9
commit dc74f5d8a5
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ const { preflight, corsify } = cors({
// 10.*.*.* with any port
/^http:\/\/10\.\d+\.\d+\.\d+:\d+$/,
// 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