[英]Unable to get request.referer to return value other than nil
So far I have been unable to get request.referer to return the refering URL (which in this case would point to the first method). 到目前为止,我一直无法获得request.referer返回引用URL(在这种情况下,它将指向第一个方法)。 I used both mobile and desktop browers (Firefox, Opera, Safari, Chrome) and so far have been unable to get a non-nil value returned.
我同时使用了移动浏览器和桌面浏览器(Firefox,Opera,Safari,Chrome),到目前为止,我一直无法获得非零值。
def first
redirect_to test_path
end
def second
@r = request.referer
end
使用此作为参考:
request.env["HTTP_REFERER"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.