Make sure Authorization header is not set when using cookie based auth

This commit is contained in:
Jackson Harper
2023-05-22 18:24:41 +08:00
parent da6e32df8f
commit 215bd7f58f
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
function gqlRequest(apiUrl, query) {
return getStorageItem('apiKey')
.then((apiKey) => {
const auth = apiKey ? { Authorization: apiKey } : {}
return fetch(apiUrl, {
method: 'POST',
redirect: 'follow',
@ -9,7 +10,7 @@ function gqlRequest(apiUrl, query) {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: apiKey ? apiKey : undefined,
...auth,
},
body: query,
})

View File

@ -316,13 +316,14 @@
'.omnivore-top-button-label'
)
labels.forEach((label) => {
console.log(' - hiding label', label)
label.style.display = 'none'
})
const container = root.shadowRoot.querySelector(
'#omnivore-toast-container'
)
container.style.width = '280px'
container.style.top = 'unset'
container.style.bottom = '20px'
}
}

View File

@ -2,7 +2,7 @@
#omnivore-toast-container {
position: fixed;
top: 20px;
right: 30px;
right: 20px;
display: flex;
flex-direction: row;