Skip to content

Commit

Permalink
Do not replace redirection location if nil
Browse files Browse the repository at this point in the history
  • Loading branch information
zapic0 committed May 19, 2016
1 parent f8ba7fa commit 12e76cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/middleware/no_cms/microsites/micrositer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def replace_host_for response, request, microsite, headers, status
# If we are redirecting, we need to remove root path from redirection url too
if status == 302
new_location = headers["Location"].gsub!("#{request.host}#{microsite.root_path}", "#{request.host}/")
headers["Location"] = new_location
headers["Location"] = new_location unless new_location.blank?
end
if response.respond_to? :header
response.header["Content-Length"] = length.to_s
Expand Down

0 comments on commit 12e76cf

Please sign in to comment.