Alright we’ll figure it out. I have had trouble with ELK CORS (same 405) with other builds cf https://github.com/deviantony/docker-elk
We need to figure out best practices and document this. Isn’t our build, this is an ELK issue. Joshua Poore > On Jun 7, 2021, at 10:46 PM, Lewis John McGibbney <[email protected]> wrote: > > I tried downgrading to ES 6.8.2 as per > https://github.com/apache/incubator-flagon/tree/master/docker/elasticsearch/6.8.2 > but I couldn't get the example running either > https://github.com/apache/incubator-flagon-useralejs/tree/master/example > I am still getting the HTTP 405 response... method not allowed for the POST. > lewismc > >> On 2021/06/07 20:04:20, Lewis John McGibbney <[email protected]> wrote: >> Thanks Josh. >> >>> On 2021/06/05 22:10:03, Joshua Poore <[email protected]> wrote: >>> Thanks Lewis, >>> >>> We have some of those conifgs in the top level repo. I’ll look and see the >>> delta with your configs, and document. More soon. >>> >>> Joshua Poore >>> >>> >>>> On Jun 5, 2021, at 1:52 PM, Lewis John McGibbney <[email protected]> >>>> wrote: >>>> >>>> Hi user@, >>>> >>>> I am seeing HTTP 405 method not allowed responses when I attempt to send >>>> UserALE JS events to a logging endpoint (local Elasticsearch cluster >>>> exposing port 9200) via the userale-2.1.1.min.js script tag. My script >>>> configuration is as follows >>>> https://github.com/apache/airflow/pull/16230/files#diff-c6895778cea9b9b1778984fa5874f46e2713ed5d2afa7eacaa75e0ef6b874868 >>>> I am NOT using the data-auth parameter so the value is passed as 'None'. >>>> Because the web application I am trying to implement UserALE JS in uses >>>> Jinja templating it is necessary to have some value. >>>> >>>> A couple of questions >>>> 1. As UserALE JS POST's batches of events to the logging endpoint, what >>>> preliminary configuration is required in Elasticsearch i.e. do we need to >>>> create the index and mapping before UserALE can log into it? My >>>> understanding is that if I POST to http://localhost:9200/userale then the >>>> mapping should be created automatically... however the 405 response >>>> indicates that this is not the case. >>>> 2. It would be good if we could provide CORS documentation. In >>>> Elasticsearch, the following represents one way of getting things working >>>> >>>> elasticsearch.yaml >>>> ------------------------- >>>> +http.cors.enabled: true >>>> +http.cors.allow-origin: "*" >>>> +http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE >>>> +http.cors.allow-headers: "X-Requested-With,X-Auth-Token,Content-Type, >>>> Content-Length, Authorization" >>>> >>>> Thanks >>>> lewismc >>> >>
