Symfony 3.4。 我强迫邮件程序只使用https与邮件中的URL(例如来自FOSBundle的激活/忘记密码邮件)的问题,例如:
message: | Hello %username%! To finish activating your account - please visit %confirmationUrl% This link can only be used once to validate your account. Regards, the Team.有没有办法强制邮件使用HTTPS的%confirmationUrl%和其他人? 谢谢!
Symfony 3.4. I have a problem with forcing mailer use only https with URLs in mail such as activation/forgot password mail from FOSBundle, example:
message: | Hello %username%! To finish activating your account - please visit %confirmationUrl% This link can only be used once to validate your account. Regards, the Team.is there way to force mailer use https for %confirmationUrl% and others? Thanks!
最满意答案
强制路由 - 用于生成完整的URL - 到https。 看到这个页面 。
要做到这一点,你将不得不添加你自己的fosuserbundle路由版本。 你可以在这里找到路由文件 。
将它们复制到你的src / AppBundle / Resources / config bundle目录并编辑它们,让它们强制https并更改app / config / routing.yml以包含你自己的文件
Force the routes -that are used to generate full URL's- to https. See this page.
To do that you will have to add your own version of the fosuserbundle routing. You can find the routing files here.
Copy them to your src/AppBundle/Resources/config bundle directory and edit them to make them force https and change app/config/routing.yml to include your own files
更多推荐
发布评论