Skip to content

headers-whitelist does not pass headers #427

Open
@kiblik

Description

@kiblik

Hello,

I wanted to use parameter headers-whitelist but (as I said in #364), Cerebro doesn't pass my headers.

Cerebro version: 0.8.5

conf/application.conf:
...
hosts = [
  {
    host = "http://localhost:9200"
    name = "http://localhost:9200"
    headers-whitelist = ['authorization', 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-server', 'x-forwarded-user', 'x-proxy-user']
  }
]

Checking by ngrep:
ngrep -q -W byline '' 'tcp port 9200 or tcp port 9000' -d lo

Output:

T ::1:34654 -> ::1:9000 [AP] #368
POST /connect HTTP/1.1.
Host: localhost:9000.
Authorization: Basic dGVzdGVyOnRlc3Rlcg==.
Accept: application/json, text/plain, */*.
Sec-Fetch-Dest: empty.
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36.
DNT: 1.
Content-Type: application/json;charset=UTF-8.
Origin: https://test-cerebro.local:4433.
Sec-Fetch-Site: same-origin.
Sec-Fetch-Mode: cors.
Referer: https://test-cerebro.local:4433/.
Accept-Encoding: gzip, deflate, br.
Accept-Language: en-US,en;q=0.9,sk-SK;q=0.8,sk;q=0.7,cs;q=0.6.
X-Proxy-User: tester.
X-Forwarded-For: ::1.


T ::1:34654 -> ::1:9000 [AP] #370
X-Forwarded-Host: test-cerebro.local:4433.
X-Forwarded-Server: test-cerebro.local.
Connection: Keep-Alive.
Content-Length: 32.
.
{"host":"http://localhost:9200"}

T 127.0.0.1:57252 -> 127.0.0.1:9200 [AP] #372
GET /_cluster/health HTTP/1.1.
host: localhost:9200.
accept: */*.
user-agent: AHC/2.1.
.

Thanks for help

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions