This commit is contained in:
evanpelle
2026-03-30 21:15:57 -07:00
parent 6fa9bf692b
commit 2dbd73cc21
6 changed files with 6 additions and 2 deletions
+1
View File
@@ -57,6 +57,7 @@
<script>
window.GIT_COMMIT = <%- gitCommit %>;
window.ASSET_MANIFEST = <%- assetManifest %>;
window.WS_URL = <%- wsUrl %>;
window.BOOTSTRAP_CONFIG = {
gameEnv: <%- gameEnv %>,
};
+1 -1
View File
@@ -54,7 +54,7 @@ export class PublicLobbySocket {
}
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const wsUrl = `${protocol}//${window.location.host}${this.workerPath}/lobbies`;
const wsUrl = `${protocol}//${window.WS_URL}/${this.workerPath}/lobbies`;
this.ws = new WebSocket(wsUrl);
this.wsAttemptCounted = false;
+1
View File
@@ -163,6 +163,7 @@ function updateAccountNavButton(userMeResponse: UserMeResponse | false) {
declare global {
interface Window {
GIT_COMMIT: string;
WS_URL: string;
turnstile: any;
adsEnabled: boolean;
PageOS: {
+1 -1
View File
@@ -324,7 +324,7 @@ export class Transport {
) {
this.startPing();
this.killExistingSocket();
const wsHost = window.location.host;
const wsHost = window.WS_URL;
const wsProtocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const workerPath = this.lobbyConfig.serverConfig.workerPath(
this.lobbyConfig.gameID,
+1
View File
@@ -26,6 +26,7 @@ export async function renderHtmlContent(htmlPath: string): Promise<string> {
backgroundImageUrl: buildAssetUrl("images/background.webp", assetManifest),
desktopLogoImageUrl: buildAssetUrl("images/OpenFront.webp", assetManifest),
mobileLogoImageUrl: buildAssetUrl("images/OF.webp", assetManifest),
wsUrl: JSON.stringify(`${process.env.SUBDOMAIN}.${process.env.DOMAIN}`),
});
}
+1
View File
@@ -101,6 +101,7 @@ export default defineConfig(({ mode }) => {
inject: {
data: {
gitCommit: JSON.stringify("DEV"),
wsUrl: JSON.stringify("localhost:9000"),
...htmlAssetData,
},
},