Skip to content

Unable to Call API with custome header data  #4

Closed
@adminrai

Description

@adminrai

Hi
Please provide me help i am unable to call api from react with custome header data.

const response = fetch('http://localhost/server/logout',{headers: {'Auth': 'foobar'}});

Its through Error:
Access to fetch at 'http://localhost/server/logout' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions