Symfony FOSUserBundle https在邮件中(Symfony FOSUserBundle https in mails)

编程入门 行业动态 更新时间:2024-10-27 22:19:42
Symfony FOSUserBundle https在邮件中(Symfony FOSUserBundle https in mails)

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

更多推荐

本文发布于:2023-08-01 01:46:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1351773.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:邮件   FOSUserBundle   Symfony   mails   https

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!