Sha256: 77d4290579f933f32558015964a5da7bfba69adbba70f780e17cdb724ed38475

Contents?: true

Size: 266 Bytes

Versions: 15

Compression:

Stored size: 266 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class StripXForwardedHost
    def initialize(app)
      @app = app
    end

    def call(env)
      env["HTTP_X_FORWARDED_HOST"] = nil unless Decidim.follow_http_x_forwarded_host
      @app.call(env)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
decidim-core-0.24.3 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.6 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.24.2 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.5 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.24.1 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.24.0 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.24.0.rc2 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.4 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.24.0.rc1 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.3 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.2 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.1 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.1.rc1 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.23.0 app/middleware/decidim/strip_x_forwarded_host.rb
decidim-core-0.22.0 app/middleware/decidim/strip_x_forwarded_host.rb