takanome-dev / astro.go.blog

Blog app with Astro 🚀 on the front and Go 🐹 on the back
https://blog-with-astro-golang.vercel.app/
MIT License
32 stars 5 forks source link

feat: use cookies instead of localstorage #22

Closed takanome-dev closed 11 months ago

takanome-dev commented 11 months ago

This PR introduces a new feature that replaces the usage of local storage with cookies. By using cookies, we ensure a more secure and efficient way of storing data. This change enhances the overall performance and reliability of the application.

Generated using OpenSauced.

Tickets

Fixes #17

Gifs

takanome-dev commented 11 months ago

Working fine when using Postman, but still wondering why the browser(fetch) does not include the cookie when making request to the server :thinking:

takanome-dev commented 11 months ago

Ok, so it's working when credentials: "include" is included in the request and it's client-side.

For SSR, I manually add Cookie: "<value>" in the headers because, for some reason, credentials:"include" does not work there...