🐛 Bug Report: setting header "X-Fallback-Cookies" gets overwritten on request #64
Closed
2 tasks done
Labels
bug
Something isn't working
👟 Reproduction steps
Setting header "X-Fallback-Cookies" without "cookieFallback" inside localStorage always sets the header to blank string.
Appwrite.setSession function:
👍 Expected behavior
The header "X-Fallback-Cookies" gets set to the loaded value and a client side request will be send with the header present.
👎 Actual Behavior
Since the localstorage is empty the provided value gets overridden with an empty string and the request will fail with a 401 error.
i believe the bug happens inside client.ts on line 373-375:
there is no check if "X-Fallback-Cookies" is present at the time of the request so the value will always be overwritten if window and window.localStorage return true.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
MacOS
🧱 Your Environment
Sveltekit 1.22.3
Appwrite 1.3.7
Appwrite Client: 11.0.0
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: