source:
frontend/src/axios.js@
e6c2521
Last change on this file since e6c2521 was e6c2521, checked in by , 6 months ago | |
---|---|
|
|
File size: 358 bytes |
Rev | Line | |
---|---|---|
[e6c2521] | 1 | import axios from "axios"; |
2 | ||
3 | ||
4 | const instance = axios.create({ | |
5 | baseURL: "http://localhost:8080/", | |
6 | withCredentials: true, | |
7 | maxRedirects: 1, | |
8 | beforeRedirect: (options, { headers }) => { | |
9 | console.log(options) | |
10 | if (options.hostname === "example.com") { | |
11 | options.auth = "user:password"; | |
12 | }} | |
13 | ||
14 | }) | |
15 | ||
16 | export default instance |
Note:
See TracBrowser
for help on using the repository browser.