正在加载视频...
视频加载失败
New in Astro 5.7, the Sessions API lets you store user data securely on the server, without the limitations of cookies. Great for shopping carts, user settings, form state, and lots more.
8 条评论

Type-safe, and as easy to use as get() and set(). Store large, complex objects. Everything is stored on the server, avoiding user tampering. Session cookies are handled automatically, or go cookieless and handle the IDs yourself.

Session storage is zero-config on Node.js and Netlify, almost-zero on Cloudflare and Vercel, or choose from loads of built-in storage drivers, including Redis and SQL. The Astro Sessions API is easy out of the box, and as customizable as you need.

Fascinating how the 90s web stuff rediscovered today

Respect the OG

Sessions is really, really great addition. BUT, There is a HUGE problem with cloudflare deployments They force the trailing slash on all pages - and it clashes with astro config Many people don’t even know about this issue, and it breaks down the whole website’s SEO if not configured correctly - duplicate pages, nobody thinks to set the correct cannonicals depending on their slash config in astro, and redirects are not ideal for SEO without the correct canonicals. Also if somebody has no slash links all over their site, and they are deployed on cloudflare - they effectively redirect the client on every navigation without even knowing

@astrodotbuild Wouldn't it be sufficient to set trailingSlash to "always" when you're hosting with Cloudflare?

This is my kinda web dev.

API testing of interfaces is critical to determine if they meet requirements for functionality, reliability, performance, and security. Check out RTTS - the automated testing experts since 1996. #API #testautomation #integrationtest
相关视频
Sensitive content
Shopping without her shoes...in nylon feet! From Tik Tok User : sp_loves_nylons
hspcollectionx
16,108 次观看 • 1 年前

