go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.28k stars 195 forks source link

Add support for `forward` proxy header #1003

Open ARolek opened 2 months ago

ARolek commented 2 months ago

In looking at func scheme() I see we do some auto detection for X-forward-for, This header is considered non-standard though its use is fairly ubiquitous. X-Forward-For has been superseded by RFC7239. It would probably be well served to implement support for that as well. Haproxy will set this header properly when options forwarded is add to the relevant haproxy backend section of the configuration. The go-forward package makes handling both X-Forward-* and forwarded headers easy.

Originally posted by @dBitech in https://github.com/go-spatial/tegola/issues/994#issuecomment-2194685463