feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions (#5496)
This commit is contained in:
committed by
GitHub
parent
ca411e54eb
commit
154c9b43bd
@@ -1,7 +1,9 @@
|
||||
import { buildRegexpIfValid } from "./build-regexp-if-valid";
|
||||
import { buildRegexpIfValid } from "./build-regexp-if-valid"
|
||||
|
||||
export function parseCorsOrigins(str: string): (string | RegExp)[] {
|
||||
return str.split(",").map((subStr) => {
|
||||
return buildRegexpIfValid(subStr) ?? subStr
|
||||
})
|
||||
return !str
|
||||
? []
|
||||
: str.split(",").map((subStr) => {
|
||||
return buildRegexpIfValid(subStr) ?? subStr
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user