mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-19 11:24:57 -05:00
18 lines
489 B
TypeScript
18 lines
489 B
TypeScript
export function createMarkdownResponse(
|
|
content: string,
|
|
init: ResponseInit = {},
|
|
) {
|
|
const headers = new Headers(init.headers);
|
|
headers.set("Content-Type", "text/markdown; charset=utf-8");
|
|
return new Response(content, { ...init, headers });
|
|
}
|
|
|
|
export function createNegotiatedMarkdownResponse(
|
|
content: string,
|
|
init: ResponseInit = {},
|
|
) {
|
|
const headers = new Headers(init.headers);
|
|
headers.set("Vary", "Accept");
|
|
return createMarkdownResponse(content, { ...init, headers });
|
|
}
|