LoginSignup
3
3

More than 5 years have passed since last update.

request_method という Cookie がセットされてしまう

Posted at

Rails のコントローラが "request_method" という Cookie をセットしようとすることはないだろうか?

スクリーンショット 2014-07-10 17.54.30.png

これは Turbolinks という Gem が出力するもので、Web サイトのリンク遷移を速くするもの。ページにはよいが、 REST API のコントローラなどには全くもって不要なものである。

before_action で挿入している ようなので、以下のコードでスキップできる。

class APIController < ApplicationController
  skip_before_action :set_request_method_cookie
end
3
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3