fix: Reverse Proxy support (#3173)

This commit is contained in:
Degot
2024-10-19 05:49:34 +03:00
committed by GitHub
parent fc78f5a4e0
commit a3ba700522
11 changed files with 33 additions and 32 deletions

View File

@@ -4,7 +4,7 @@ import {createI18n} from "vue-i18n";
import en from './public/assets/locale/en.json'
export default async function() {
let r = await (await fetch("/api/configLocale")).json();
let r = await (await fetch("./api/configLocale")).json();
let locale = r.locale ?? "en";
document.querySelector('html').setAttribute('lang', locale);
let messages = {
@@ -12,7 +12,7 @@ export default async function() {
};
try {
if (locale !== 'en') {
let r = await (await fetch(`/assets/locale/${locale}.json`)).json();
let r = await (await fetch(`./assets/locale/${locale}.json`)).json();
messages[locale] = r;
}
} catch (e) {