4 Matching Annotations
  1. Jan 2022
    1. In hooks.js I have a handle function that basically does request.locals.jwt = cookies.jwt, and then a getSession function that returns { jwt: locals.jwt }
  2. Jun 2021
  3. May 2021
    1. This function runs on every request, for both pages and endpoints, and determines the response. It receives the request object and a function called resolve, which invokes SvelteKit's router and generates a response accordingly.
    2. This allows you to modify response headers or bodies, or bypass SvelteKit entirely