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

Zuul add-proxy-headers could be aware of upstream X-Forwarded-* headers #754

Closed
kakawait opened this issue Jan 5, 2016 · 1 comment
Closed

Comments

@kakawait
Copy link
Contributor

kakawait commented Jan 5, 2016

It may possible the following problem is not an issue

Using following architecture

                +      ^
                |      |
                |      |
                v      +
            +-------------+
            |  Reverse    |
            |  Proxy SSL  |
            +-------------+
                +      ^
                |      |
                |      |
                v      +
            +-------------+
            |             |
            |     ZUUL    |
            +-------------+
                ^   ^   ^
         +------+   |   +-----+
         |          |         |
         v          v         v
      +------+   +------+  +------+
      |      |   |      |  |      |
      | m1   |   | m2   |  | m3   |
      |      |   |      |  |      |
      +------+   +------+  +------+

Where Reverse proxy SSL could be Nginx/Apache thus Zuul and all microservices communications is under HTTP.

Basically Reverse proxy SSL add X-Forwarded-* headers on downstream like:

  • X-Forwarded-Host
  • X-Forwarded-Proto
  • X-Forwarded-Port
  • X-Forwarded-Prefix for context path

But when using properties zuul.add-proxy-headers to true Zuul does not care about these headers and my hostname will be transformed to localhost

In other hand if zuul.add-proxy-headers to false headers are correctly transmitted by X-Forwarded-Prefix becomes not reliable. Indeed X-Forwarded-Prefix will not be updated to correct context-path of the given microservices/routes.

May I miss something? Possible solution is to set zuul.add-proxy-headers to false and write my own ZuulFilter. If you think is not common case feel free to close issue. Could be dup of #352

@kakawait kakawait changed the title add-proxy-headers could be aware of X-Forwarded-* headers Zuul add-proxy-headers could be aware of X-Forwarded-* headers Jan 5, 2016
@kakawait kakawait changed the title Zuul add-proxy-headers could be aware of X-Forwarded-* headers Zuul add-proxy-headers could be aware of upstream X-Forwarded-* headers Jan 5, 2016
@kakawait
Copy link
Contributor Author

kakawait commented Jan 5, 2016

Never mind issue come from stripPrefix: false. I will close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant