a tool for shared writing and social publishing
at 89a5e06cfb4576b98ad25c74688e7e1d99cdd0fb 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}