-
Hi I have production app made in Remix which currently uses cookieSessionStorage. However, cookie session storage doesn't work out quite well since it causes race conditions with flash sessions on some routes (because of commiting in multiple routes and these routes finish obviously in unknown order). I would prefer switch to createWorkersKVSessionStorage but I haven't found any examples how to apply it to node server. All examples expect using Cloudflare pages solution, which is not the case for my project. I still want to handle my own server for main tasks, but using Cloudflare KV worker to store sessions' data. Question is, can I use createWorkersKVSessionStorage driver or should I generate custom driver? If it's possible to use createWorkersKVSessionStorage in my scenario, maybe can somebody help me to right direction? How or where should I handle worker's authorization? Hope somebody can help me to right direction. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
KV Sessions are meant for running on Cloudflare not node. You can use file sessions or create a custom session storage for your database for example. |
Beta Was this translation helpful? Give feedback.
KV Sessions are meant for running on Cloudflare not node. You can use file sessions or create a custom session storage for your database for example.