From 782d2084ca00cb247d69abfd87f2e60ca7c5050e Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 9 Jun 2018 15:08:46 +0200 Subject: [PATCH] fix http vs. https for CAS service (redirection) --- build/api/module/casController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/api/module/casController.php b/build/api/module/casController.php index cb25ec9..a7a42d8 100644 --- a/build/api/module/casController.php +++ b/build/api/module/casController.php @@ -100,7 +100,7 @@ class casController{ /* (2) Check ticket (validate) ---------------------------------------------------------*/ /* (1) Build useful variables */ - $service = ($_SERVER['SERVER_NAME'] == 'ptut.com' ) ? 'http' : 'https'; + $service = ($_SERVER['SERVER_PORT'] == 80) ? 'http' : 'https'; $service .= '://'.$_SERVER['HTTP_HOST'].'/api/v/1.0/cas/'.$popup_mode; $ticket = urlencode($_GET['ticket']); $validate_url = "https://sso.univ-pau.fr/cas/serviceValidate?ticket=$ticket&service=$service"; @@ -259,4 +259,4 @@ class casController{ } -} \ No newline at end of file +}