Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] How to use Jetty ProxyServlet for reverse proxying?

Hi,

On Tue, Aug 31, 2021 at 5:46 PM Peter Boughton <jetty@xxxxxxxxxxxxxxxxx> wrote:
>
> Since BalancerServlet has rewriteTarget implemented, it seems a
> workaround would be to use this with a single member.
>
> I was experimenting with that and found a minor bug: if there are no
> members defined it gives a divide by zero error. (I expected something
> along the lines of "no balancer members defined").
>
> Adding a member via setInitParameter balancerMember.a.proxyTo and it
> then starts proxying.
>
> However, there's a more significant issue: given a servletMapping of
> /proxy/* a request to http://localhost:8080/proxy/ is sent to
> http://localhost:8081/proxy/ - I expected it would go instead to
> http://localhost:8081/ - i.e. that the servletMapping would be removed.
>
> If the inclusion of servletMapping is deliberate (or can't be fixed
> without breaking backwards compatibility), then a parameter to
> explicitly exclude it would be useful.
>
>
> Should I add the above as comments to 6678, raise as distinct issue(s),
> or something else?

Please add as a comment to the existing issue.

The issue you raised turned out to be of a larger scope, as the
current proxy module is for forward proxies, not reverse proxies.
We plan to be more explicit about these modules and document them in Jetty 10.

-- 
Simone Bordet
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


Back to the top