Disable Cookies in Rails 3.x app
问题 Is there a way to disable all cookies for a Rails app? Or preferably on a controller by controller basis? My problem is regarding access of a Rails JSON api by an Adobe Lightroom plugin. Apparently the presence of any cookie data in the response from the server causes an error in Lightroom. 回答1: In the controller you want to avoid cookies, add this: after_filter :skip_set_cookies_header def skip_set_cookies_header request.session_options = {} end If you have a set of api controllers, set this