From 986a52106766e7497322951c2bf3a3cbd0b42bf9 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 25 Mar 2017 15:54:18 +0100 Subject: Add an endpoint to refresh the token Useful for AJAX requests which burns the token --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 40539a04..9566fb01 100644 --- a/index.php +++ b/index.php @@ -1582,6 +1582,13 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) exit; } + // Get a fresh token + if ($targetPage == Router::$GET_TOKEN) { + header('Content-Type:text/plain'); + echo getToken($conf); + exit; + } + // -------- Otherwise, simply display search form and links: showLinkList($PAGE, $LINKSDB, $conf, $pluginManager); exit; -- cgit v1.2.3