source: frontend/src/axios.js@ ac19a0c

Last change on this file since ac19a0c was ac19a0c, checked in by darsov2 <62809499+darsov2@…>, 10 months ago

authContext impl, admin panel impl, search bar fixes, reservations listings impl

  • Property mode set to 100644
File size: 358 bytes
RevLine 
[e9b4ba9]1import axios from "axios";
2
[ac19a0c]3
[e9b4ba9]4const instance = axios.create({
5 baseURL: "http://localhost:8080/",
6 withCredentials: true,
[ac19a0c]7 maxRedirects: 1,
8 beforeRedirect: (options, { headers }) => {
9 console.log(options)
10 if (options.hostname === "example.com") {
11 options.auth = "user:password";
12 }}
[e9b4ba9]13
[ac19a0c]14})
[e9b4ba9]15
16export default instance
Note: See TracBrowser for help on using the repository browser.