Rails mailer edit_user_url uses http not https

后端 未结 2 1271
囚心锁ツ
囚心锁ツ 2021-01-11 09:40

My entire app is https, no http.

If add the following to any of the views

I get a \"edit user\" linked to

https://localhost:3000/user/2/edit

相关标签:
2条回答
  • 2021-01-11 10:06

    I believe that you have to put in your config/environments/production.rb:

    config.action_mailer.default_url_options = {:protocol => 'https'}
    
    0 讨论(0)
  • 2021-01-11 10:24

    Editing my config/environments/development file with

    host = "hostaddress.io"    
    config.action_mailer.default_url_options = { host: host, protocol: 'https' }
    

    worked for me on Rails 4.2.2.

    0 讨论(0)
提交回复
热议问题