"eslint-plugin-prettier": "^3.3.1",
"husky": "^5.1.0",
"iso-639-1": "^2.1.9",
- "lemmy-js-client": "0.10.0-rc.12",
+ "lemmy-js-client": "0.10.0-rc.13",
"lint-staged": "^10.5.4",
"mini-css-extract-plugin": "^1.3.8",
"node-fetch": "^2.6.1",
import process from "process";
import { Helmet } from "inferno-helmet";
import { initializeSite } from "../shared/initialize";
-import { httpUri } from "../shared/env";
+import { httpBase } from "../shared/env";
import { IncomingHttpHeaders } from "http";
import { setOptionalAuth } from "../shared/utils";
const server = express();
-const hostname = process.env['LEMMY_UI_HOST'] || 'localhost'
-const port = process.env['LEMMY_UI_PORT'] || 1234;
+const hostname = process.env["LEMMY_UI_HOST"] || "localhost";
+const port = process.env["LEMMY_UI_PORT"] || 1234;
server.use(express.json());
server.use(express.urlencoded({ extended: false }));
let headers = setForwardedHeaders(req.headers);
let initialFetchReq: InitialFetchRequest = {
- client: new LemmyHttp(httpUri, headers),
+ client: new LemmyHttp(httpBase, headers),
auth,
path: req.path,
};
secure = process.env.LEMMY_HTTPS == "true" ? "s" : "";
}
-const httpBase = `http://${host}`; // Don't use secure here
-export const wsUri = `ws${secure}://${wsHost}/api/v2/ws`;
-export const httpUri = `${httpBase}/api/v2`;
+export const httpBase = `http://${host}`; // Don't use secure here
+export const wsUri = `ws${secure}://${wsHost}/api/v3/ws`;
export const pictrsUri = `http${secure}://${host}/pictrs/image`;
console.log(`httpbase: ${httpBase}`);
dependencies:
invert-kv "^1.0.0"
-lemmy-js-client@0.10.0-rc.12:
- version "0.10.0-rc.12"
- resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.10.0-rc.12.tgz#b00fc55f78e3544b2ecf35a363e4f6781c7acd1e"
- integrity sha512-GKdSBsjSxiWe3bDPgJXiHU8WDWvTDAgYUtQah+2LSjbTxP6G1ARBoZZmIf1ZFIIEBVH6I3n5apkiECK5/veZdg==
+lemmy-js-client@0.10.0-rc.13:
+ version "0.10.0-rc.13"
+ resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-0.10.0-rc.13.tgz#ea2e88857243374d7fbd49ee6b4bb94c34359d85"
+ integrity sha512-zodvYkwBYR7iP27ah6L/QPUphUUdq38kCH7QF2CUYBrsSAEkGmq2kdz+iusnQ1Ht7Ad80GtYycFprsZBveV5eQ==
levn@^0.4.1:
version "0.4.1"