mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 07:41:13 +00:00
Remove unused extra language issue.
This commit is contained in:
parent
4a89c24075
commit
7b6b47c7c8
2 changed files with 3 additions and 16 deletions
|
@ -76,20 +76,10 @@ server.get("/*", async (req, res) => {
|
||||||
return res.redirect(`/404?err=${errCode}`);
|
return res.redirect(`/404?err=${errCode}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let acceptLang = req.headers["accept-language"]
|
|
||||||
? req.headers["accept-language"].split(",")[0]
|
|
||||||
: "en";
|
|
||||||
let lang = site.my_user
|
|
||||||
? site.my_user.local_user.lang == "browser"
|
|
||||||
? acceptLang
|
|
||||||
: "en"
|
|
||||||
: acceptLang;
|
|
||||||
|
|
||||||
let isoData: IsoData = {
|
let isoData: IsoData = {
|
||||||
path: req.path,
|
path: req.path,
|
||||||
site_res: site,
|
site_res: site,
|
||||||
routeData,
|
routeData,
|
||||||
lang,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const wrapper = (
|
const wrapper = (
|
||||||
|
@ -160,9 +150,9 @@ server.listen(Number(port), hostname, () => {
|
||||||
console.log(`http://${hostname}:${port}`);
|
console.log(`http://${hostname}:${port}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
function setForwardedHeaders(
|
function setForwardedHeaders(headers: IncomingHttpHeaders): {
|
||||||
headers: IncomingHttpHeaders
|
[key: string]: string;
|
||||||
): { [key: string]: string } {
|
} {
|
||||||
let out = {
|
let out = {
|
||||||
host: headers.host,
|
host: headers.host,
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,9 +9,6 @@ export interface IsoData {
|
||||||
path: string;
|
path: string;
|
||||||
routeData: any[];
|
routeData: any[];
|
||||||
site_res: GetSiteResponse;
|
site_res: GetSiteResponse;
|
||||||
// Lang and theme
|
|
||||||
lang: string;
|
|
||||||
// communities?: ListCommunitiesResponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILemmyConfig {
|
export interface ILemmyConfig {
|
||||||
|
|
Loading…
Reference in a new issue