Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 play Framework 中,我怎样才能让URL用户来自一个controller?
URL
controller
我试过request.url了,但这不起作用。
request.url
以前的 url 将带有referer键下的 http 标头。在 JAVA 中,您可以使用:
referer
String refererUrl = request().getHeader("referer");
如果你在 Scala 中这样做:
val refererUrl = request.headers("referer")