mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2025-04-01 20:24:01 +02:00
Sending cookies with fetch, bg color change
This commit is contained in:
@@ -10,7 +10,7 @@ class MyDocument extends Document {
|
||||
return (
|
||||
<Html>
|
||||
<Head />
|
||||
<body bgcolor='#212127'>
|
||||
<body bgcolor='#222426'>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
||||
@@ -52,7 +52,9 @@ export default function Index (props) {
|
||||
setData(null)
|
||||
const toFetch = `${constants.apiUrl}data.json`
|
||||
console.info('Fetching', toFetch)
|
||||
fetch(toFetch)
|
||||
fetch(toFetch, {
|
||||
credentials: 'include'
|
||||
})
|
||||
.then((resp) => {
|
||||
if (resp && resp.ok) {
|
||||
return resp.json()
|
||||
|
||||
Reference in New Issue
Block a user