【问题标题】:What’s the purpose of the value request_method in Rails cookies?Rails cookie 中 request_method 值的用途是什么?
【发布时间】:2013-12-21 13:56:26
【问题描述】:

我想知道 Rails 4 应用程序的每个 cookie 中的值 request_method 的用途是什么。

$ curl -i localhost:3000
HTTP/1.1 200 OK 
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Ua-Compatible: chrome=1
Content-Type: text/html; charset=utf-8
Etag: "396b1283ee1adc85adf3c604a553ad74"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: d8577072-a823-418c-b521-6c34dbe71645
X-Runtime: 0.068436
Server: WEBrick/1.3.1 (Ruby/2.0.0/2013-06-27)
Date: Wed, 04 Dec 2013 21:16:38 GMT
Content-Length: 4375
Connection: Keep-Alive
Set-Cookie: request_method=GET; path=/
...

我用谷歌搜索了它,但在任何地方都找不到答案。为什么不只使用会话值?

【问题讨论】:

    标签: ruby-on-rails http cookies ruby-on-rails-4 session-cookies


    【解决方案1】:

    此 cookie 与 Turbolinks 相关。 (来源:https://github.com/rails/turbolinks/search?q=request_method&ref=cmdform

    如果您完全卸载此 gem,它将消失。

    【讨论】:

      猜你喜欢
      • 2014-10-15
      • 1970-01-01
      • 1970-01-01
      • 2010-09-07
      • 2013-09-03
      • 2014-12-17
      • 2012-06-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多