changed according to the third tour
This commit is contained in:
@ -3,7 +3,7 @@ import dataProvider from "@refinedev/simple-rest";
|
||||
import { TOKEN_KEY } from "@providers";
|
||||
|
||||
import axios from "axios";
|
||||
import { languageStore } from "../store/LanguageStore";
|
||||
import { languageStore } from "@stores";
|
||||
export const axiosInstance = axios.create({
|
||||
baseURL: import.meta.env.VITE_KRBL_API,
|
||||
});
|
||||
@ -17,7 +17,7 @@ axiosInstance.interceptors.request.use((config) => {
|
||||
|
||||
// Добавляем язык в кастомный заголовок
|
||||
|
||||
config.headers["X-Language"] = languageStore.language;
|
||||
config.headers["X-Language"] = config.headers["Accept-Language"];
|
||||
|
||||
console.log("Request headers:", config.headers);
|
||||
|
||||
|
Reference in New Issue
Block a user