Update CORS to allow GitHub.dev origins
This commit is contained in:
@ -35,12 +35,14 @@ function isAllowedOrigin(origin) {
|
||||
|
||||
try {
|
||||
const host = new URL(origin).hostname
|
||||
if (host.endsWith('.vercel.app')) return true
|
||||
return (
|
||||
host.endsWith('.vercel.app') ||
|
||||
host.endsWith('.app.github.dev')
|
||||
)
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const corsOptions = {
|
||||
origin: (origin, cb) => {
|
||||
|
||||
Reference in New Issue
Block a user