Skip to content

Fails to query in Firefox due to CORS #45

@ishanray

Description

@ishanray

When trying to use this library in Firefox, it fails with:

Screenshot 2023-02-16 115209

Seems like this is being caused by trying to change the User-Agent while creating the fetch wrapper.

The reason it works in Chrome is because Chrome doesn't allow overriding of the User-Agent due to this longstanding bug

Request headers in Firefox:
Screenshot 2023-02-16 115048

Request headers in Chrome:
Screenshot 2023-02-16 115018

The fix would be to simply add User-Agent on the server side CORS config or delete this line from the library since Chrome users are not using this right now.

I verified it works in Firefox if that line is deleted. I can open a patch if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions