I want to forward requests to a particular path but I am not able to do it using thenForwardTo(). It is throwing error and it only accepts hostname (without path).
For example, I want to match one absolute URL & forward it to another absolute URL.
// Redirect any github/login requests to github.com/signup
server.anyRequest().forHost("https://github.com/login").thenForwardTo("https://github.com/signup");
I want to forward requests to a particular path but I am not able to do it using thenForwardTo(). It is throwing error and it only accepts hostname (without path).
For example, I want to match one absolute URL & forward it to another absolute URL.
// Redirect any github/login requests to github.com/signupserver.anyRequest().forHost("https://github.com/login").thenForwardTo("https://github.com/signup");