added withcredentials to axios request

This commit is contained in:
2019-05-21 16:42:36 +02:00
parent ccf9afacc2
commit 63ecfa89c7
3 changed files with 5 additions and 3 deletions

View File

@@ -7,9 +7,10 @@ console.log(window.location);
export const JSONAPI = axios.create({
baseURL: window.location.origin+`/jsonapi`,
withCredentials: true,
headers: {
Accept: 'application/vnd.api+json'
// Authorization: 'Bearer {token}',
// Authorization: 'Basic {token}',
// "Content-Type": "application/json"
}
})

View File

@@ -6,6 +6,7 @@ import axios from 'axios'
export const REST = axios.create({
baseURL: window.location.origin,
withCredentials: true,
headers: {
Authorization: 'Bearer {token}',
"Content-Type": "application/json"