mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
update cors to check array
This commit is contained in:
@@ -78,6 +78,13 @@ export function corsWithLoginPageSupport(corsConfig: any) {
|
||||
return callback(null, true);
|
||||
}
|
||||
|
||||
if (
|
||||
corsConfig?.origins &&
|
||||
corsConfig.origins.includes(origin)
|
||||
) {
|
||||
return callback(null, true);
|
||||
}
|
||||
|
||||
// If origin doesn't match dashboard URL, check if it's a valid loginPage domain
|
||||
const isValidDomain = await isValidLoginPageDomain(originHost);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user