lib/saml/rails/controller_helper.rb in libsaml-2.1.9 vs lib/saml/rails/controller_helper.rb in libsaml-2.2.1
- old
+ new
@@ -1,8 +1,13 @@
module Saml
module Rails
module ControllerHelper
+ def self.included(base)
+ base.extend self
+ base.before_filter :set_response_headers
+ end
+
def current_provider(entity_id_or_method = nil, &block)
if block_given?
before_filter &block
else
case entity_id_or_method
@@ -14,9 +19,14 @@
end
end
def current_store(store)
before_filter { Saml.current_store = store }
+ end
+
+ def set_response_headers
+ response.headers['Cache-Control'] = 'no-cache, no-store'
+ response.headers['Pragma'] = 'no-cache'
end
end
end
end