In play Framework, how can I get the URL
the user came from in a controller
?
I've tried request.url
, but that isn't working.
Previous url will come with the http headers under the referer
key. In JAVA you can get it using:
String refererUrl = request().getHeader("referer");
and if you doing it in Scala:
val refererUrl = request.headers("referer")