From f8356fdb7688e25bc21f3289b00bdf922d2214d7 Mon Sep 17 00:00:00 2001 From: Samuel Jensen <44519206+nichtsam@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:28:02 +0200 Subject: [PATCH] update headers related docs --- docs/server-timing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/server-timing.md b/docs/server-timing.md index 248f7690..4d66c3c7 100644 --- a/docs/server-timing.md +++ b/docs/server-timing.md @@ -74,6 +74,8 @@ export async function loader({ params }: LoaderFunctionArgs) { ) } +// We have a general headers handler to save you from boilerplating. +// export const headers: HeadersFunction = pipeHeaders export const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => { return { 'Server-Timing': combineServerTimings(parentHeaders, loaderHeaders), // <-- 4. Send headers