From d197565fcc5ed91913b5d682ac42b482cfde400b Mon Sep 17 00:00:00 2001 From: Bofh Date: Sat, 17 Dec 2022 19:22:57 +0100 Subject: [PATCH] Create client-side javascript cache-busting system for API --- index.php | 5 ++++ js/base.php | 58 ++++++++++++++++++++++++++++++++++++++++------ views/instance.php | 6 ++--- 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index f30d6d6..64c97ae 100644 --- a/index.php +++ b/index.php @@ -23,6 +23,11 @@ window.consts = { }; window.view = {}; window.cache = {}; +window.http_cachebuster = { + 'api/v1/http/[^\/]+/accounts/[^\/]+': 'users', + 'api/v1/config/trusted_users/add': 'users', + 'api/v1/cache/put?keys=temp_hidden': 'users', +};