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 +}