From 46ba44d042243ef0b6af5ae2cd973209d05f1006 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Tue, 20 Mar 2018 23:51:39 +0100 Subject: [PATCH] [module.cas] PUT is so slow.. timeout (CAS server not responding in consistent time) --- build/api/module/casController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/api/module/casController.php b/build/api/module/casController.php index 9f999bd..5667490 100644 --- a/build/api/module/casController.php +++ b/build/api/module/casController.php @@ -181,14 +181,13 @@ class casController{ /* (1) Call logout script ---------------------------------------------------------*/ /* (1) Build useful variables */ - $service = ($_SERVER['SERVER_NAME'] == 'ptut.com' ) ? 'http' : 'https'; - $service .= '://'.$_SERVER['HTTP_HOST'].'/api/v/1.0/cas'; - $logout_url = "https://sso.univ-pau.fr/cas/logout?service=$service"; + $logout_url = "https://sso.univ-pau.fr/cas/logout"; /* (2) Configure & Prepare CURL */ $ch = \curl_init(); \curl_setopt($ch, CURLOPT_URL, $logout_url); + \curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); \curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); /* (3) Execute CURL & Close it */