import process from "process";
import { Helmet } from "inferno-helmet";
import { initializeSite } from "../shared/initialize";
-import { httpBase } from "../shared/env";
+import { httpBaseInternal } from "../shared/env";
import { IncomingHttpHeaders } from "http";
import { setOptionalAuth } from "../shared/utils";
let headers = setForwardedHeaders(req.headers);
let initialFetchReq: InitialFetchRequest = {
- client: new LemmyHttp(httpBase, headers),
+ client: new LemmyHttp(httpBaseInternal, headers),
auth,
path: req.path,
};
secure = process.env.LEMMY_HTTPS == "true" ? "s" : "";
}
-export const httpBase = `http://${host}`; // Don't use secure here
+export const httpBaseInternal = `http://${host}`; // Don't use secure here
+export const httpBase = `http${secure}://${host}`;
export const wsUri = `ws${secure}://${wsHost}/api/v3/ws`;
-export const pictrsUri = `http${secure}://${host}/pictrs/image`;
+export const pictrsUri = `${httpBase}/pictrs/image`;
console.log(`httpbase: ${httpBase}`);
console.log(`wsUri: ${wsUri}`);