Sha256: fdf3556cb0fa1af81f0f7b14ec8d91ecd03515a0e61690a0d2b1048a23566850
Contents?: true
Size: 564 Bytes
Versions: 1
Compression:
Stored size: 564 Bytes
Contents
module FastlyRails module SurrogateControlHeaders extend ActiveSupport::Concern included do end # Sets Surrogate-Control header # Defaults are: # Cache-Control: 'public, no-cache, s-maxage: 30 days' # Surrogate-Control: 'max-age: 30 days # custom config example: # {cache_control: 'blah, blah, blah', surrogate_control: 'max-age: blah'} def set_surrogate_key_header(surrogate_key) request.session_options[:skip] = true # no cookies response.headers['Surrogate-Key'] = surrogate_key end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fastly-rails-0.1.0 | lib/fastly-rails/action_controller/surrogate_control_headers.rb |