Back

SSR with Storage

  • 0
  • Auth
Mr. Bakbuki
16 Mar, 2024, 14:31

Since a custom cookie is needed for SSR, the session won't be sent over when making requests client side, which means that if a user has permissions to view a file in Storage, they will get an error when trying to view it because the session cookie is set on my server and not on the Appwrite server. How can I solve this issue?

TL;DR
Developers are discussing Server-Side Rendering (SSR) with Storage. They are facing an issue where a custom cookie for SSR causes permission errors accessing files in Storage because the session is set on their server, not the Appwrite server. Solution: Use a proxy on your server to forward requests to Appwrite, and include the necessary session information.
D5
16 Mar, 2024, 14:38

Isn't the same as database?

Mr. Bakbuki
16 Mar, 2024, 14:39

Yeah but since everything is fetched server side that wasn't a problem

D5
16 Mar, 2024, 14:39

I think you could fetch the image server side too?

Mr. Bakbuki
16 Mar, 2024, 14:40

I mean that's possible but it would just load my server with unnecessary fetching

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more