diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index 79bac1a..b5c8e20 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -92,6 +92,11 @@ class SecurityController extends AbstractController UrlGeneratorInterface::ABSOLUTE_URL, ); + // Ensure HTTPS scheme in production + if ($this->getParameter('kernel.environment') === 'prod') { + $activationUrl = str_replace('http://', 'https://', $activationUrl); + } + $mailer->send( new TemplatedEmail() ->from('noreply@mineseeker.hu') @@ -143,6 +148,11 @@ class SecurityController extends AbstractController UrlGeneratorInterface::ABSOLUTE_URL, ); + // Ensure HTTPS scheme in production + if ($this->getParameter('kernel.environment') === 'prod') { + $resetUrl = str_replace('http://', 'https://', $resetUrl); + } + $mailer->send( new TemplatedEmail() ->from('noreply@mineseeker.hu') diff --git a/templates/emails/activation.html.twig b/templates/emails/activation.html.twig index fe858b2..6e78d83 100644 --- a/templates/emails/activation.html.twig +++ b/templates/emails/activation.html.twig @@ -77,7 +77,7 @@
+