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.
在我的控制器内部,我想知道如何获取调用我的控制器的 URL?
您可以使用
request.env['HTTP_REFERER']
或者
request.referer