UNPKG

@qelos/auth

Version:

Express Passport authentication service

6 lines (4 loc) 208 B
import {AuthRequest} from '../../types'; export function getRequestHost(req: AuthRequest): string { return (req.headers.tenanthost || req.headers.host || new URL(req.headers.origin).host).split(':')[0]; }