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

Support X-Forwarded-* headers #220

Closed
bclozel opened this issue Nov 15, 2017 · 2 comments
Closed

Support X-Forwarded-* headers #220

bclozel opened this issue Nov 15, 2017 · 2 comments
Labels
type/enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Nov 15, 2017

When an application sits behind an HTTP proxy terminating the TLS connection, the proxy sets X-Forwarded-* to tell the server about the original request: host, port, and protocol information.

Most servers (Tomcat, Undertow and Jetty) deal with that in their own codebase since it involves wrapping/changing the request information at a low level.

Could Reactor Netty support an HttpServerOption for enabling such a feature?

This should be disabled by default, as this could lead to attackers spoofing their peer address if there is no proxy in front of the application or if the proxy does not clean those incoming headers.

@nebhale
Copy link
Member

nebhale commented Nov 16, 2017

I wonder if it should also follow some of the Tomcat conventions (not sure about how the other two act) regarding internal proxies.

@smaldini smaldini modified the milestones: 0.8.0.RELEASE, 0.7.x Backlog Nov 20, 2017
bclozel added a commit to bclozel/reactor-netty that referenced this issue Dec 21, 2017
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes reactorgh-220
bclozel added a commit to bclozel/reactor-netty that referenced this issue Dec 21, 2017
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes reactorgh-220
bclozel added a commit to bclozel/reactor-netty that referenced this issue Jan 9, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes reactorgh-220
@violetagg violetagg modified the milestones: 0.8.x Backlog, 0.8.0.RELEASE Jan 9, 2018
violetagg added a commit that referenced this issue Jan 15, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg added a commit that referenced this issue Jan 15, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
bclozel added a commit to bclozel/reactor-netty that referenced this issue Jan 15, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes reactorgh-220
violetagg pushed a commit that referenced this issue Jan 15, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
@violetagg
Copy link
Member

Fixed by PR #249
Extended support will be covered by #259

violetagg pushed a commit that referenced this issue Jan 15, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg pushed a commit that referenced this issue Jan 17, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg pushed a commit that referenced this issue Jan 19, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg pushed a commit that referenced this issue Jan 22, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg pushed a commit that referenced this issue Jan 24, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
@violetagg violetagg mentioned this issue May 14, 2018
24 tasks
violetagg pushed a commit that referenced this issue May 16, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
violetagg pushed a commit that referenced this issue May 28, 2018
This commit adds new information to the `HttpServerRequest`:
* the host (server) address
* the remote (client) address
* the scheme used by the current request

This information can be either derived from the current channel, or
extracted from the incoming HTTP request headers using "Forwarded"
or "X-Forwarded-*".

This feature is opt-in, and must be configured during server setup:

  HttpServer.create().forwarded().port(8080);

Closes gh-220
@violetagg violetagg modified the milestones: 0.8.0.RELEASE, 0.8.0.M1 Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants