proper seo file routing
This commit is contained in:
parent
bfe3bb2c71
commit
384f5df17c
1 changed files with 9 additions and 4 deletions
|
|
@ -1,15 +1,20 @@
|
|||
import axios from 'axios';
|
||||
import { store } from '../store';
|
||||
|
||||
// Create the base axios instance
|
||||
let url = "";
|
||||
if(import.meta.env.VITE_ENVIRONMENT === "beta"){
|
||||
url = import.meta.env.VITE_API_URL.split('/api')[0]
|
||||
}else {
|
||||
url = `https://${import.meta.env.VITE_API_PROD_URL}`
|
||||
}
|
||||
|
||||
const axiosClient = axios.create({
|
||||
baseURL: import.meta.env.VITE_API_URL.split('/api')[0],
|
||||
baseURL: url,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
});
|
||||
|
||||
// Add request interceptor to include API key in headers if available
|
||||
// console.log(url, `https://${import.meta.env.VITE_API_PROD_URL}`)
|
||||
axiosClient.interceptors.request.use(
|
||||
(config) => {
|
||||
const state = store.getState();
|
||||
|
|
|
|||
Loading…
Reference in a new issue