def call(env)
      @request = Rack::Request.new(env)

      return @app.call(env) if ignore?

      @scheme = if enforce_ssl?
        'https'
      elsif enforce_non_ssl?
        'http'
      end

      if redirect_required?
        call_before_redirect
        modify_location_and_redirect
      elsif ssl_request?
        status, headers, body = @app.call(env)
        flag_cookies_as_secure!(headers) if @options[:force_secure_cookies]
        set_hsts_headers!(headers) if @options[:hsts] && !@options[:strict]
        [status, headers, body]
      else
        @app.call(env)
      end
    end
def call(env)
      @request = Rack::Request.new(env)

      return @app.call(env) if ignore?

      @scheme = if enforce_ssl?
        'https'
      elsif enforce_non_ssl?
        'http'
      end

      if redirect_required?
        call_before_redirect
        modify_location_and_redirect
      elsif ssl_request?
        status, headers, body = @app.call(env)
        flag_cookies_as_secure!(headers) if @options[:force_secure_cookies]
        set_hsts_headers!(headers) if @options[:hsts] && !@options[:strict]
        [status, headers, body]
      else
        @app.call(env)
      end
    end
Warning: If you set the option force_secure_cookies to false, make sure that your cookies
 are encoded and that you understand the consequences (see documentation)