diff --git a/src/api/files.js b/src/api/files.js index 00d16339..602090c1 100644 --- a/src/api/files.js +++ b/src/api/files.js @@ -88,7 +88,7 @@ export async function post (url, content = '', overwrite = false, onupload) { return new Promise((resolve, reject) => { let request = new XMLHttpRequest() request.open('POST', `${baseURL}/api/resources${url}?override=${overwrite}`, true) - request.setRequestHeader('Authorization', `Bearer ${store.state.jwt}`) + request.setRequestHeader('X-Auth', store.state.jwt) if (typeof onupload === 'function') { request.upload.onprogress = onupload diff --git a/src/api/utils.js b/src/api/utils.js index b2f1e931..617e2258 100644 --- a/src/api/utils.js +++ b/src/api/utils.js @@ -10,7 +10,7 @@ export async function fetchURL (url, opts) { const res = await fetch(`${baseURL}${url}`, { headers: { - 'Authorization': `Bearer ${store.state.jwt}`, + 'X-Auth': store.state.jwt, ...headers }, ...rest diff --git a/src/utils/auth.js b/src/utils/auth.js index 1516175a..ae050ba3 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -55,7 +55,7 @@ export async function renew (jwt) { const res = await fetch(`${baseURL}/api/renew`, { method: 'POST', headers: { - 'Authorization': `Bearer ${jwt}`, + 'X-Auth': jwt, } })