Reply To: How do I forward to another host?

Splash Forums Rewrite Users How do I forward to another host? Reply To: How do I forward to another host?

#25474

Okay. It’s done. No tests ported, but I can verify that it works. Tests will have to follow 🙂 As you can see, it’s a half hack, but so far very reliable. Features will need to be added as needed.

https://github.com/ocpsoft/rewrite/commit/33f738641eaaa36377602a3a2b53bc89e5fe1306

Example usage:


.addRule()
.when(Path.matches("/something"))
.perform(Proxy.to("http://example.com/something-else?foo=bar"))

No extra header support yet. That will have to be added if you need it. It just passes the request through exactly as received, with all original headers and cookies.