Explore >> Select a destination


You are here

www.seancdavis.com
| | 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...
| | nabeelvalley.co.za
4.9 parsecs away

Travel
| | A look at developing Web APIs using the AdonisJS Framework and MongoDB
| | lisilinhart.info
4.0 parsecs away

Travel
| | Quickly transforming JSON Data into Storyblok Content
| | www.pillar.security
21.2 parsecs away

Travel
| [AI summary] The article discusses the Model Context Protocol (MCP), an open standard for AI assistants to interact with external tools and services, while highlighting its security risks and the need for robust security measures to protect against vulnerabilities like token theft, server compromise, and prompt injection attacks.