Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What’s the purpose of the value request_method in Rails cookies?

I’m wondering what’s the purpose of the value request_method that is found in every cookie of a Rails 4 application.

$ 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=/
...

I’ve googled for it and found no answer anywhere. Why not just use the session value?

like image 269
Alf Avatar asked Dec 04 '13 21:12

Alf


1 Answers

This cookie is related to Turbolinks. (Source: https://github.com/rails/turbolinks/search?q=request_method&ref=cmdform)

If you completelly uninstall this gem, it will disappear.

like image 167
sequielo Avatar answered Sep 28 '22 15:09

sequielo