From aeda5599a67b2f88f73a9c6e717f04e8f16755ec Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Apr 2022 16:14:04 -0400 Subject: [PATCH] clarify that handle is only called when the server receives a request (#4546) --- documentation/docs/04-hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/docs/04-hooks.md b/documentation/docs/04-hooks.md index 68204f940322..ab87c843d4ee 100644 --- a/documentation/docs/04-hooks.md +++ b/documentation/docs/04-hooks.md @@ -8,7 +8,7 @@ An optional `src/hooks.js` (or `src/hooks.ts`, or `src/hooks/index.js`) file exp ### handle -This function runs every time SvelteKit receives a request — whether that happens while the app is running, or during [prerendering](/docs/page-options#prerender) — and determines the response. It receives an `event` object representing the request and a function called `resolve`, which invokes SvelteKit's router and generates a response (rendering a page, or invoking an endpoint) accordingly. This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing endpoints programmatically, for example). +This function runs every time the SvelteKit server receives a request — whether that happens while the app is running, or during [prerendering](/docs/page-options#prerender) — and determines the response. It receives an `event` object representing the request and a function called `resolve`, which invokes SvelteKit's router and generates a response (rendering a page, or invoking an endpoint) accordingly. This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing endpoints programmatically, for example). ```js /// file: src/hooks.js