How to remove Set-Cookie header from answer in rails 3?

I have some actions that respond with static content. I also need to cache them on the client.

A similar question was asked in the past for rails 2

Is it possible to omit the set-cookie header from a response in Rails 2.3?

+4
source share
2 answers

Use the built-in option.

env['rack.session.options'][:skip] = true or request.session_options[:skip] = true 

or in older versions use this

 env['rack.session.options'][:defer] = true or request.session_options[:defer] = true 

The documentation can be found here http://rack.rubyforge.org/doc/Rack/Session/Abstract/ID.html

+9
source

All Articles