fabiolb / fabio

Consul Load-Balancing made simple
https://fabiolb.net
MIT License
7.25k stars 619 forks source link

How to get the client's hostname using gRPC protocol #779

Open alexandu12 opened 4 years ago

alexandu12 commented 4 years ago

Hello,

I would like to know if there is a way to get the client's hostname using Fabio as LB and gRPC protocol.

The setup is : gRPC server - Consul - fabio LB

Right now, the gRPC header remote-addr returns the hostname where fabio is installed. Besides this, I would have expected to have other headers set like: Forwarded, X-Real-Ip, X-Forwarded-For, X-Forwarded-Port and X-Forwarded-Proto, but actually none of them are present.... Is this the expected behavior for gRPC ? https://fabiolb.net/feature/http-headers/

I've tried to configure Fabio to add some headers but none of these seems to work.... proxy.header.clientip, proxy.header.tls and proxy.header.tls.value

Thank you,

alexandu12 commented 3 years ago

Does anyone knows if Fabio (with gRPC protocol) supports this ?