FleetCart/resources/js/install/Axios.js
2023-12-03 14:07:47 +00:00

9 lines
258 B
JavaScript

import axios from "axios";
window.axios = axios;
const token = document.querySelector('meta[name="csrf-token"]').content;
axios.defaults.headers.common["X-CSRF-TOKEN"] = token;
axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";