fix: enable external auth by using a different header (#87)
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>pull/739/head
parent
89d4d828b9
commit
e370fbe500
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue