Bläddra i källkod

added withcredentials to axios request

Bachir Soussi Chiadmi 5 år sedan
förälder
incheckning
63ecfa89c7

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


+ 2 - 1
web/themes/custom/materiotheme/vuejs/api/json-axios.js

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

+ 1 - 0
web/themes/custom/materiotheme/vuejs/api/rest-axios.js

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

Vissa filer visades inte eftersom för många filer har ändrats