From d033df5ee7263f8043b85046f66bb5e678fc0bbb Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 3 Mar 2018 16:47:57 +0100 Subject: [PATCH] removed 'toremove' --- 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 36afd76..7b9e2f0 100644 --- a/build/api/module/casController.php +++ b/build/api/module/casController.php @@ -73,8 +73,8 @@ class casController{ /* (2) Check ticket (validate) ---------------------------------------------------------*/ /* (1) Build useful variables */ - $service = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/api/v/1.0/cas'; - var_dump($service); + $service = ($_SERVER['SERVER_NAME'] == 'ptut.com' ) ? 'http' : 'https'; + $service .= '://'.$_SERVER['HTTP_HOST'].'/api/v/1.0/cas'; $ticket = urlencode($_GET['ticket']); $validate_url = "https://sso.univ-pau.fr/cas/serviceValidate?ticket=$ticket&service=$service";