@asgardeo/nextjs
Version:
Next.js implementation of Asgardeo JavaScript SDK.
10 lines • 358 B
JavaScript
'use server';
import { headers } from 'next/headers';
const getClientOrigin = async () => {
const headersList = await headers();
const host = headersList.get('host');
const protocol = headersList.get('x-forwarded-proto') ?? 'http';
return `${protocol}://${host}`;
};
export default getClientOrigin;
//# sourceMappingURL=getClientOrigin.js.map