Skip to content

Error when sending logs to elasticsearch #2

Open
@jhiemer

Description

@jhiemer

Hi,
first of all thank you for this cool library. Installation and configuration are very easy to manage. The only issue I have is that I get the following error, when sending logs to ES.

XMLHttpRequest cannot load http://X.Y.Z.W:9200/_bulk. Request header field Authorization is not allowed by Access-Control-Allow-Headers in preflight response.

The origin is that all my outgoing requests to contain an authorisation token in the header, when talking to different endpoint in the application and as I am doing a CORS request not against localhost, the preflight OPTIONS request is not allowed by ES. The question now is, if this should be cleaned up before creating the request, or silently accepting the header on the ES side.

What do you think?

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