From 4acea23e56dbe36d29fc20838098f289dd4f69ed Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 26 Mar 2017 21:44:31 +0300 Subject: [PATCH] Automatically set https in link if REQUIRE_HTTPS is enabled --- app/Models/Invitation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index 37c89b8952..0e493bf204 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -76,6 +76,10 @@ class Invitation extends EntityModel $iframe_url = $account->iframe_url; $url = trim(SITE_URL, '/'); + if (env('REQUIRE_HTTPS')) { + $url = str_replace('http://', 'https://', $url); + } + if ($account->hasFeature(FEATURE_CUSTOM_URL)) { if (Utils::isNinjaProd()) { $url = $account->present()->clientPortalLink();