Explore >> Select a destination


You are here

www.seancdavis.com
| | moopinger.github.io
14.3 parsecs away

Travel
| | Place to store my thoughts on all things information-security related. Hopefully you find something of interest. Ramblings are my own. Charlton Smith
| | jonathan-frere.com
12.7 parsecs away

Travel
| | This is a quick post to point out a potential issue that might catch you out with using Fastify's sessions mechanism alongside tRPC's websockets transport, and how I've fixed it in my projects. The problem happens with an application that looks something like this: const app = Fastify(); app.register(ws); app.register(fastifyCookie); app.register(fastifySession, { secret: "..." }); app.register(fastifyTRPCPlugin, { prefix: "/trpc", useWSS: true, trpcOptions: { router, onError, createContext: ({ req }) => { console.log(req.session); // logs "undefined" return {}; }, }, }); The useWSS parameter passed to the tRPC plugin means that it can handle both standard HTTP requests and a persistent websocket connection. Theoretically, both of these kinds of requests get...
| | www.coryd.dev
3.9 parsecs away

Travel
| | When I first moved my site to Cloudflare, I kept all of my Cloudflare Workers in their own repositories. I wanted to keep my account and zone IDs secret, but wasn't sure how best to do so. So there they sat cozy (but lonely) in their own repositories with their...
| | yann.lecun.com
18.7 parsecs away

Travel
|