I'm looking for something like
def proxy = Action.async { implicit req =>
//do something with req
val newRequest = req.map( r = r.path = "http://newurl");
forward(newRequest)
}
I saw that there is a redirect
method but that only allows me to pass the request parameters and not everything else, headers, etc.
I am hoping there is something built in so I don't have to build it myself.
Redirect(route.Controller.pageToRedirect(param1,param2)).withCookies( Cookie("theme", "blue") ).withHeaders(CACHE_CONTROL -> "max-age=3600", ETAG -> "xx")
– Narcosis