a tool for shared writing and social publishing
at feec5d34fdcdb07e5da9e920984e3c40f7f14a29 7 lines 284 B view raw
1import { headers } from "next/headers"; 2export async function getCurrentDeploymentDomain() { 3 const headersList = await headers(); 4 const hostname = headersList.get("x-forwarded-host"); 5 let protocol = headersList.get("x-forwarded-proto"); 6 return `${protocol}://${hostname}/`; 7}