Skip to content
Back

Firefox CORS issue

  • 0
  • Web
  • REST API
Pingu
2 Mar, 2025, 12:55

Hey all, have an issue with Firefox in an app I recently launched. When attempting to hit Appwrite for magic url login, I'm getting a CORS issue in firefox only. Specifically, CORS Missing Allow Header

Firefox is sending an OPTIONS request (which Chrome is opting not to bother with). The options request has tthe following header:

TypeScript
Access-Control-Request-Headers
    content-type,user-agent,x-appwrite-project,x-appwrite-response-format,x-sdk-language,x-sdk-name,x-sdk-platform,x-sdk-version

and the response has the following header:

TypeScript
access-control-allow-headers
    Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent

All of the requested headers are there, other than user-agent which I am not actually explicitly setting in the SDK anywhere. There is a casing difference, which I have changed in my SDK this morning, however after making the change, the OPTIONS request from firefox still shows everything in lowercase, not capitalized despite that not being what I set.

Any idea how I can resolve this?

The issue can b eseen live right now, if you enter any email in firefox in the login form here: https://wrevo.com and inspect the request, you will see it failing.

TL;DR
Developers are experiencing a CORS issue in Firefox only, specifically the `CORS Missing Allow Header`. Firefox is sending an OPTIONS request with certain headers, while the response headers are missing some. The developer has updated the SDK to address a casing difference but the issue persists. To resolve, ensure all requested headers are correct and match exactly in the SDK.
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