Is there any way to forward to an absolute path using thenForwardTo()? as it only accepts hostname without path

71 views Asked by At

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 (without changing the url in the address bar).

// Redirect any github/login requests to github.com/signup
server.anyRequest()
    .forHost("https://github.com/login")
    .thenForwardTo("https://github.com/signup");
0

There are 0 answers