// import {JsonRegex, CorsConfig} from "../features/auth/auth-types.js" // export const unpackCorsConfig = ({allowed, forbidden}: CorsConfig) => ({ // allowed: unpackRegex(allowed), // forbidden: unpackRegex(forbidden), // }) // export const unpackRegex = (json: JsonRegex) => json // ? new RegExp(json.pattern, json.flags) // : null