update api_url
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const api = axios.create({
|
const api = axios.create({
|
||||||
baseURL: process.env.REACT_APP_API_URL || 'http://localhost:5080',
|
baseURL:
|
||||||
headers: {
|
process.env.REACT_APP_API_URL ||
|
||||||
'Content-Type': 'application/json',
|
(process.env.NODE_ENV === 'production' ? window.location.origin : 'http://localhost:5080')
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add token to requests if it exists
|
// Add token to requests if it exists
|
||||||
|
|||||||
Reference in New Issue
Block a user