ruby-on-rails - Rails request.referer 在 Internet Explorer 中不起作用

标签 ruby-on-rails ruby-on-rails-3 cas spree

我正在 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/

相关文章:

grails - 使用 Grails Spring Security CAS 插件重定向循环

cas - CAS 和 Keycloak 有什么区别?

ssl - 如何确定服务器将从客户端接受的 CA 证书列表?

ruby-on-rails - 如何在确认后使 Devise 重定向

ruby-on-rails - 使用 HAML 而不是 ERB 导致测试失败

ruby-on-rails - ActiveResource::ResourceNotFound:失败。响应代码 = 404。响应消息 = 未找到

ruby-on-rails - 应用程序 Controller 中的 before_filter 仅用于获取请求

ruby-on-rails - Rails - 在 image_tag 中插入变量

ruby-on-rails - 如何对存储在 Rails 5.1 和 PG 的 JSONb 字段中的多个值求和

ruby-on-rails-3 - 获取错误 : You must install at least one postgresql-client-<version> package when deploy to heroku