add configuration option for Proxy Protocol
See original GitHub issueDropwizard currently provides a configuration option to read X-Forwarded-* headers, useForwardedHeaders, but provides no similar configuration option to read HAProxy PROXY protocol data frames, such as those able to be sent through by AWS ELBs. The NGINX blog has a write-up about this as well.
In vanilla Jetty, this is accomplished using the ProxyConnectionFactory, as described in Jetty’s docs on configuring Connectors.
Dropwizard should include a configuration option to support reading the PROXY protocol.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Configure proxy protocol support for your Classic Load Balancer
To enable proxy protocol, you must create a policy of type ProxyProtocolPolicyType and then enable the policy on the instance port. Use the...
Read more >Accepting the PROXY Protocol | NGINX Plus
This article explains how to configure NGINX and NGINX Plus to accept the PROXY protocol, rewrite the IP address of a load balancer...
Read more >Enable Proxy protocol · Cloudflare Spectrum docs
Locate the application that will use the PROXY protocol and click Configure. From the dropdown, select PROXY Protocol v1.
Read more >Configuring the HAProxy Router to Use the PROXY Protocol
To simplify subsequent steps, first set some shell variables: · Next, create the ELB with the appropriate listeners, security groups, and subnets. ·...
Read more >Configure proxy protocol support for your Classic Load Balancer
If you enable proxy protocol, a human-readable header is added to the request header with connection information such as the source IP address,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

One way around this currently is to create and register another command which is a clone of the Server Command. I just changed the run method to add the
ProxyConnectionFactorylike so:and registered this as a separate command in the initialize phase of my Application
I tried the suggested solution but it doesn’t work! If I do as stated above, then not sure, exactly at what point does this break, but with my haproxy setup, I see
I tested this with pure jetty. The above error happens when server side is not able to handle proxy protocol header.