Mikle
Mikle
Explore posts from servers
SSolidJS
Created by Samual 🦢 on 9/7/2023 in #support
set response header from within `createServerData$()` callback
You can access the request headers and set cookies like this: createServerData$( async (_, { request }) => { request.headers.set('cookie', request.headers.get('cookie') || '') }, { key: () => ['auth_user'] }, )
8 replies
SSolidJS
Created by Mikle on 9/1/2023 in #support
Fetching data with authorisation token
Ideally I want to cut down the lines of code required for each component that makes a request and just have simple get functions in the routeData, even if that means wrapping the createServerData but I couldnt manage to get a wrapper to work
8 replies
SSolidJS
Created by Mikle on 9/1/2023 in #support
Fetching data with authorisation token
It all works, Im just wondering if the way im going about it is the best practice for appending the accessToken to every request or whether ive set something up wrong architecturally
8 replies