我,正在尝试在 elasticsearch 2.0.0 中启用跨域访问。以下是 logstash 2.0.0 中的输出配置:
output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => "localhost"
header => {"Access-Control-Allow-Origin": "true"}
index => "testindex"
}
但是我收到以下错误:
Error: Expected one of #, => at line 28, column 42 (byte 500) after output {
stdout {
codec => rubydebug
}
elasticsearch {
hosts => "localhost"
header => {"Access-Control-Allow-Origin"
有人可以告诉我我在这里做错了什么。谢谢
PS:我认为当我从输出中删除标题时,这很可能是语法错误原因,其他一切正常。