Hello! I'm working with logstash and the http input plugin. I've a datasource that send a data stream to logstash and require as response header content-type => application/json. I'm using the following configuration, but the response content-type is always text/plain as shown below:
input {
http {
port => 8080
codec => "json"
response_headers => {
"Access-Control-Allow-Origin" => "*"
"Content-Type" => "application/json"
"Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type, Accept"
}
}
}
output {
stdout {}
}
Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< content-type: text/plain
< content-length: 2
< access-control-allow-origin: *
< access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept
Any suggestion?
Thanks