Forum: Ruby on Rails modify headers

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Yoav B. (Guest)
on 2005-12-05 13:42
how can i modify the headers sent to the browser?
i have tried using response.headers but it generates a server error. i
tried also just doing headers[]= but got an error also. i saw somewhere
saying to do @response.headers.
so i am a bit confused now...3 different approchases, and non worked :)

i'd like to do: response.headers['expire'] = 0

where should i put this? i'd like this to be for the entire application,
so my first thought was application.rb under controllers.

thanks...
This topic is locked and can not be replied to.