mock-server / mockserver

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
http://mock-server.com
Apache License 2.0
4.56k stars 1.07k forks source link

Forward incoming request on JEE-Server #1753

Open ThiAmm opened 1 year ago

ThiAmm commented 1 year ago

Describe the feature request All incoming requests are forwarded by default to the host and port specified by setting the environment variable proxyRemoteHost and proxyRemotePort on the JEE-Server.

What you are trying to do I use the deployable WAR on a JEE-Server and would like to forward all incoming requests by default to a predefined host and port. This is already possible and documented with the maven-plugin by setting proxyRemotePort and proxyRemoteHost, but it is not documented for the deployable WAR (though it is possible to forward requests by adding the following http header on the client-side: Host: <proxyRemoteHost>:<proxyRemotePort>).

The solution you'd like Specifiy proxyRemoteHost and proxyRemotePort as a environment variable on the JEE-Server and forward all incoming requests to this host and port.

ThiAmm commented 1 year ago

See https://github.com/mock-server/mockserver/pull/1756.