~emersion/kimchi

512fa7bfc3d3ea299fcff92d79d4588558d56753 — delthas 16 days ago 3a1e9b1 master
Set the X-Forwarded-* headers
2 files changed, 5 insertions(+), 1 deletions(-)

M directives.go
M kimchi.1.scd
M directives.go => directives.go +3 -0
@@ 149,6 149,9 @@ var backends = map[string]parseBackendFunc{
			forwarded := fmt.Sprintf("for=%q;host=%q;proto=%q", req.RemoteAddr, req.Host, req.URL.Scheme)
			director(req)
			req.Header.Set("Forwarded", forwarded)
			req.Header.Set("X-Forwarded-For", req.RemoteAddr)
			req.Header.Set("X-Forwarded-Host", req.Host)
			req.Header.Set("X-Forwarded-Proto", req.URL.Scheme)
		}
		return proxy, nil
	},

M kimchi.1.scd => kimchi.1.scd +2 -1
@@ 69,7 69,8 @@ The following directives are supported:

		The header fields are passed through, except _Host_ which is set to the
		target URI's. The _Forwarded_ header is set with the original remote
		IP address, port, host and protocol (see RFC 7239).
		IP address, port, host and protocol (see RFC 7239), as well as the X-Forwarded-For,
		X-Forwarded-Host and X-Forwarded-Proto headers.

	*file_server* <path> { ++
	*browse* ++