Remove auth token
Some checks failed
DokuWiki Default Tasks / all (push) Has been cancelled

This commit is contained in:
2026-01-06 21:57:55 +01:00
parent 681eadaed0
commit f86dce6ec3
8 changed files with 4 additions and 20 deletions

View File

@@ -51,18 +51,10 @@
return url.replace(/\/+$/, '');
}
function getServiceToken(el) {
var token = el.getAttribute('data-service-token') || '';
return (token || '').trim();
}
function pingOpenViaImage(el, rawPath) {
var baseUrl = getServiceUrl(el);
if (!baseUrl) return;
var token = getServiceToken(el);
var url = baseUrl + '/open?path=' + encodeURIComponent(rawPath);
if (token) url += '&token=' + encodeURIComponent(token);
// Fire-and-forget without CORS.
try {
@@ -80,8 +72,6 @@
var headers = {
'Content-Type': 'application/json'
};
var token = getServiceToken(el);
if (token) headers['X-Luxtools-Token'] = token;
return window.fetch(baseUrl + '/open', {
method: 'POST',