lib/warden/strategies/base.rb in warden-1.2.6 vs lib/warden/strategies/base.rb in warden-1.2.7

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true # encoding: utf-8 module Warden module Strategies # A strategy is a place where you can put logic related to authentication. Any strategy inherits # from Warden::Strategies::Base. @@ -155,10 +156,10 @@ # # :api: public def redirect!(url, params = {}, opts = {}) halt! @status = opts[:permanent] ? 301 : 302 - headers["Location"] = url + headers["Location"] = url.dup headers["Location"] << "?" << Rack::Utils.build_query(params) unless params.empty? headers["Content-Type"] = opts[:content_type] || 'text/plain' @message = opts[:message] || "You are being redirected to #{headers["Location"]}" @result = :redirect