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