Rails mailer edit_user_url uses http not https

后端 未结 2 1288
囚心锁ツ
囚心锁ツ 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: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.

提交回复
热议问题