26 lines
494 B
Plaintext
26 lines
494 B
Plaintext
import axios from 'axios';
|
|
|
|
const BASE_URL = 'http://localhost:8080';
|
|
// const BASE_URL = 'http://103.196.222.49:8080';
|
|
|
|
|
|
|
|
|
|
export const apiClient = axios.create(
|
|
{
|
|
baseURL: BASE_URL,
|
|
crossorigin: true, // add this option
|
|
}
|
|
);
|
|
|
|
export const apiClientPrivate = axios.create(
|
|
{
|
|
baseURL: BASE_URL,
|
|
headers: {
|
|
'Content-type': 'application/json'
|
|
},
|
|
withCredentials: true,
|
|
crossorigin: true, // add this option
|
|
|
|
}
|
|
); |