Sha256: fdc29e7c3ac74877ff6c19c60be0e41f1aa0d11e5c508e6ce0c9775930d01ad8

Contents?: true

Size: 347 Bytes

Versions: 11

Compression:

Stored size: 347 Bytes

Contents

module FastlyRails
  module SurrogateKeyHeaders

    # Sets Surrogate-Key HTTP header with one or more keys
    # strips session data from the request
    def set_surrogate_key_header(*surrogate_keys)
      request.session_options[:skip] = true  # No Set-Cookie
      response.headers['Surrogate-Key'] = surrogate_keys.join(' ')
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fastly-rails-0.8.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.7.1 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.7.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.6.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.5.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.4.1 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.4.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.3.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.2.0 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.1.7 lib/fastly-rails/action_controller/surrogate_key_headers.rb
fastly-rails-0.1.6 lib/fastly-rails/action_controller/surrogate_key_headers.rb