export function validateCorsOrigin(origin, port) {
    return origin === `http://localhost:${port}` || origin === `http://127.0.0.1:${port}`;
}
export function getCorsOrigin(origin, port) {
    const fallback = `http://localhost:${port}`;
    if (!origin)
        return fallback;
    return validateCorsOrigin(origin, port) ? origin : fallback;
}
//# sourceMappingURL=cors.js.map