Last change
on this file since 0f5aa27 was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 9 months ago |
prefinal fixes
|
-
Property mode
set to
100644
|
File size:
358 bytes
|
Line | |
---|
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.