Logstash HTTP input 403 Response


I've read through a lot of documentation and topics here, but I still have problems sending a JSON document to logstash.

I have two Docker container. One is for my nodejs application, which is sending JSON documents over HTTP. The other Docker container is running a logstash instance. When I try to send the JSON document, Logstash is responding with a HTTP 403 Response code (Access Denied). I thought it could have something to do with CORS. So this is my Logstash pipeline:

input {
  http {
    port => 9601
    response_headers => {
      "Access-Control-Allow-Origin" => "*"
      "Access-Control-Request-Method" => "POST"
      "Content-Type" => "application/json"
      "Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type, Accept"

output {
  stdout { 
    codec => rubydebug 

But this does not help. The response is still the same:

The following error was encountered while trying to retrieve the URL: http://logstash:9601/
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.

When my nodejs application is not running in Docker but on my host system, I can send JSON documents to Logstash without any problems.

Has someone ecountered this already? What am I missing?

Thank you in advance,

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.