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) {
|
function gqlRequest(apiUrl, query) {
|
||||||
return getStorageItem('apiKey')
|
return getStorageItem('apiKey')
|
||||||
.then((apiKey) => {
|
.then((apiKey) => {
|
||||||
|
const auth = apiKey ? { Authorization: apiKey } : {}
|
||||||
return fetch(apiUrl, {
|
return fetch(apiUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
redirect: 'follow',
|
redirect: 'follow',
|
||||||
@ -9,7 +10,7 @@ function gqlRequest(apiUrl, query) {
|
|||||||
headers: {
|
headers: {
|
||||||
Accept: 'application/json',
|
Accept: 'application/json',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: apiKey ? apiKey : undefined,
|
...auth,
|
||||||
},
|
},
|
||||||
body: query,
|
body: query,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -316,13 +316,14 @@
|
|||||||
'.omnivore-top-button-label'
|
'.omnivore-top-button-label'
|
||||||
)
|
)
|
||||||
labels.forEach((label) => {
|
labels.forEach((label) => {
|
||||||
console.log(' - hiding label', label)
|
|
||||||
label.style.display = 'none'
|
label.style.display = 'none'
|
||||||
})
|
})
|
||||||
const container = root.shadowRoot.querySelector(
|
const container = root.shadowRoot.querySelector(
|
||||||
'#omnivore-toast-container'
|
'#omnivore-toast-container'
|
||||||
)
|
)
|
||||||
container.style.width = '280px'
|
container.style.width = '280px'
|
||||||
|
container.style.top = 'unset'
|
||||||
|
container.style.bottom = '20px'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#omnivore-toast-container {
|
#omnivore-toast-container {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
right: 30px;
|
right: 20px;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
Reference in New Issue
Block a user