Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com> Co-authored-by: tedspare <ted.spare@gmail.com> Co-authored-by: Alex van Andel <me@alexvanandel.com>
8 lines
205 B
TypeScript
8 lines
205 B
TypeScript
import type { NextRequest } from "next/server";
|
|
|
|
const getHostFromHeaders = (headers: NextRequest["headers"]): string => {
|
|
return `https://${headers.get("host")}`;
|
|
};
|
|
|
|
export default getHostFromHeaders;
|