Skip to content

Testing from localhost fails with cors #231

@nik-suri

Description

@nik-suri

Hi,

I am testing out the Amplitude product for a website I am creating. Since I run the development version of my website from localhost, I am making calls to amplitude from localhost. I also have my ad-blocker disabled.

However, all my calls to amplitude.getInstance().logEvent() fail with the following error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.amplitude.com/. (Reason: CORS request did not succeed).

Any advice on how to fix this? Can I make calls to amplitude from localhost?

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