My app was fully hosted in cloud run and i was happy with that (except cloud run throws some statx container sandbox limitation errors).
Recently I moved the static files to firebase hosting and route api requests to cloud run (It seems awesome combo for me).
But some of my api routes (pointing to cloud run) uses cookies so I ran into another issue that firebase removes the cookies for cloud run routes.
Firebase hosting removes cookies. Is there any way to use my custom cookie for cloud run routes. I don't want cookies for static assets but need for cloud run requests.
Update:
I have read the another stackoverflow solution that firebase hosting strips all cookies other than a __session cookie, that's the only cookie it supports.
There is no way to use custom or multiple cookies in firebase hosting ♂️
In my use case the app authentication uses a cookie variable and after authentication session (session also set cookies, so multiple cookies are there) will set.
What I have tried: In order to work session cookies, I have changed session cookie name to __session so both uses __session.
The problem is session no longer works. Because when I check request headers, multiple __session cookies set like the following,
Cookie: __session=auth_1234 __session=s%jashd3yq4kqj-sd43.jasyd7346%asdkjh4%asdkhk3j4h
Is there any way to overwrite previous __session cookie?
Because session cookie is set automatically by express session, right?