Skip to content

Commit

Permalink
do not use request host in for devise
Browse files Browse the repository at this point in the history
  • Loading branch information
omohokcoj committed Jan 20, 2022
1 parent 8c9c075 commit a461b75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/admin_users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def reset_password

authorize!(:manage, @admin_user)

Devise::Mailer.default_url_options = { host: request.host, protocol: request.protocol, port: request.port }
Devise::Mailer.default_url_options = { host: ENV['HOST'], protocol: request.protocol, port: request.port }

@admin_user.send_reset_password_instructions

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ApplicationController < ActionController::Base
before_action :authenticate_admin_user!, unless: :setup_path?

before_action do
Devise::Mailer.default_url_options = { host: request.host, protocol: request.protocol, port: request.port }
Devise::Mailer.default_url_options = { host: ENV['HOST'], protocol: request.protocol, port: request.port }
end

private
Expand Down

0 comments on commit a461b75

Please sign in to comment.