Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional support for the PROXY protocol #126

Merged
merged 1 commit into from
Jun 14, 2016

Commits on Apr 5, 2016

  1. Add optional support for the PROXY protocol

    This adds support for the commonly implemented PROXY protocol, allowing
    TCP proxies to pass along upstream client information. When this is
    enabled gorouter will read the PROXY preamble and inject the upstream
    information into the `X-Forwarded-For` header.
    
    http://blog.haproxy.com/haproxy/proxy-protocol/
    
    It should be noted that when using PROXY on the HTTPS port the
    `X-Forwarded-Proto` header will not be set to "https" as expected because
    the X-Forwarded-Proto code checks for source.TLS, which is only set by
    the go http library if the `conn` is a `tls.conn`:
    
    https://golang.org/src/net/http/server.go#L1398
    
    This can only be fixed properly by patching the standard library. We
    plan to submit a separate gorouter patch to allow operators to override
    the autodetected X-Forwarded-Proto if they are terminating SSL at the
    load balancer before gorouter and using PROXY to communicate with
    gorouter.
    Jonty committed Apr 5, 2016
    Configuration menu
    Copy the full SHA
    2c1f04d View commit details
    Browse the repository at this point in the history