# Logstash HTTP input 403 Response

**URL:** https://discuss.elastic.co/t/logstash-http-input-403-response/120611
**Category:** Logstash
**Created:** [February 20, 2018, 11:05am UTC](https://discuss.elastic.co/t/logstash-http-input-403-response/120611 "2018-02-20T11:05:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Daniel\_Tebernum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_tebernum/32/11595_2.png) [@Daniel\_Tebernum](https://discuss.elastic.co/u/Daniel_Tebernum)
#### Post date: [February 20, 2018, 11:05am UTC](https://discuss.elastic.co/t/logstash-http-input-403-response/120611/1 "2018-02-20T11:05:36Z")

</div>

Hello,

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,  
Daniel

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 20, 2018, 11:05am UTC](https://discuss.elastic.co/t/logstash-http-input-403-response/120611/2 "2018-03-20T11:05:59Z")

</div>

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