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 axios from 'axios';
|
||||||
import { store } from '../store';
|
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({
|
const axiosClient = axios.create({
|
||||||
baseURL: import.meta.env.VITE_API_URL.split('/api')[0],
|
baseURL: url,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// console.log(url, `https://${import.meta.env.VITE_API_PROD_URL}`)
|
||||||
// Add request interceptor to include API key in headers if available
|
|
||||||
axiosClient.interceptors.request.use(
|
axiosClient.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
const state = store.getState();
|
const state = store.getState();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue