Sha256: 662cee811f3a6fc62459c50870afea6cece978f1d097765daaf3fae3ee8c1510

Contents?: true

Size: 377 Bytes

Versions: 11

Compression:

Stored size: 377 Bytes

Contents

module FastlyRails
  module Rack
    class RemoveSetCookieHeader
      def initialize(app)
        @app = app
      end

      def call(env)
        status, headers, response = @app.call(env)

        if headers["Surrogate-Control"] || headers["Surrogate-Key"]
          headers.delete("Set-Cookie")
        end

        [status, headers, response]
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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