我正在 Rails 中开发 Spree 电子商务,并使用 CAS 进行单点登录。
使用 cas 登录后,我使用 request.referer 将其重定向到上一页,但它不适用于 Internet Explorer。
在 Internet Explorer 中,它将我重定向到我的应用程序的主页。
最佳答案
在某些情况下,IE 不会发送引用 header 。微软有一个 support article这涵盖了这一点。
When linking from one document to another in Internet Explorer 4.0 and later, the Referer header will not be sent when the link is from an HTTPS page to a non-HTTPS page. The Referer header also will not be sent when the link is from a non-HTTP(S) protocol, such as file://, to another page.
关于ruby-on-rails - Rails request.referer 在 Internet Explorer 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13308593/