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