Return no result with disallowed for CORS response, not an error

This commit is contained in:
automaton82
2024-01-25 15:43:42 -05:00
parent 657dace89e
commit 089928aaa8
+1 -1
View File
@@ -31,7 +31,7 @@ export function getCorsOptions(): any {
if (!origin || allowedOrigins == '*' || allowedOrigins.indexOf(origin) !== -1) {
callback(null, true)
} else {
callback(new Error('Not allowed by CORS'))
callback(null, false)
}
}
}