Make sure Authorization header is not set when using cookie based auth
This commit is contained in:
@ -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,
|
||||
})
|
||||
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#omnivore-toast-container {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 30px;
|
||||
right: 20px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
Reference in New Issue
Block a user