redirect com

This commit is contained in:
Pete Matsyburka
2024-11-02 09:40:17 +02:00
parent 68d3efbdba
commit f669045362
4 changed files with 11 additions and 0 deletions
@@ -104,4 +104,10 @@ class ApplicationController < ActionController::Base
def svg_icon(icon_name, class: '')
render_to_string(partial: "icons/#{icon_name}", locals: { class: })
end
def maybe_redirect_com
return if request.domain != 'docuseal.co'
redirect_to request.url.gsub('.co/', '.com/'), allow_other_host: true, status: :moved_permanently
end
end