trying to fixe axios request auth_basic

This commit is contained in:
Bachir Soussi Chiadmi 2019-05-21 17:00:14 +02:00
parent 63ecfa89c7
commit 74a821104f
2 changed files with 2 additions and 2 deletions

View File

@ -742,7 +742,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.REST = void 0;\n\nvar _axios = _interopRequireDefault(__webpack_require__(/*! axios */ \"./node_modules/axios/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js\n// console.log('drupalSettings', drupalSettings);\nvar REST = _axios.default.create({\n baseURL: window.location.origin,\n withCredentials: true,\n headers: {\n Authorization: 'Bearer {token}',\n \"Content-Type\": \"application/json\"\n }\n});\n\nexports.REST = REST;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/api/rest-axios.js?"); eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.REST = void 0;\n\nvar _axios = _interopRequireDefault(__webpack_require__(/*! axios */ \"./node_modules/axios/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// https://github.com/alvar0hurtad0/drupal-vuejs-todo/blob/master/frontend/src/api/axiosInterceptor.js\n// console.log('drupalSettings', drupalSettings);\nvar REST = _axios.default.create({\n baseURL: window.location.origin,\n withCredentials: true,\n headers: {\n // Authorization: 'Bearer {token}',\n \"Content-Type\": \"application/json\"\n }\n});\n\nexports.REST = REST;\n\n//# sourceURL=webpack:///./web/themes/custom/materiotheme/vuejs/api/rest-axios.js?");
/***/ }), /***/ }),

View File

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