Prevent caching on the ajaxLogin call when verifying Eclipse.org ID
Signed-off-by: Edouard Poitras <edouard@eclipse.org>
diff --git a/ajaxLogin.php b/ajaxLogin.php
index b028ac2..729aa46 100644
--- a/ajaxLogin.php
+++ b/ajaxLogin.php
@@ -18,6 +18,16 @@
$Friend = new Friend();
$LDAP = new LDAPConnection();
+// Date in the past
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+// always modified
+header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+// HTTP/1.1
+header("cache-Control: no-store, no-cache, must-revalidate");
+header("cache-Control: post-check=0, pre-check=0", false);
+// HTTP/1.0
+header("Pragma: no-cache");
+
$login = filter_var($_GET['login'], FILTER_SANITIZE_EMAIL);
$id = $LDAP->getUIDFromMail($login);
if ($id) echo "Verified!";