Is there a way to set cookies on page load?

Do I need to call and endpoint just to do that, or is there something I can do with routeData/createServerData? Even better, is there a middleware-like thing that can access the response? Would like to store functions inside request.locals (if that even exists).
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
pilcrow
pilcrow2y ago
Yes, just waiting for this PR to get merged https://github.com/solidjs/solid-start/pull/485
GitHub
Expose responseHeaders to createServerData$ by oscartbeaumont · Pul...
This PR exposes a way to set HTTP headers on the response within the createServerData$ function. This makes it possible to do: export function routeData() { return createServerData$((_, { respons...
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View