File tree Expand file tree Collapse file tree 5 files changed +5
-1
lines changed
Expand file tree Collapse file tree 5 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 5757 < script >
5858 window . GIT_COMMIT = < % - gitCommit % > ;
5959 window . ASSET_MANIFEST = < % - assetManifest % > ;
60+ window . WS_URL = < % - wsUrl % > ;
6061 window . BOOTSTRAP_CONFIG = {
6162 gameEnv : < % - gameEnv % > ,
6263 } ;
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ function updateAccountNavButton(userMeResponse: UserMeResponse | false) {
163163declare global {
164164 interface Window {
165165 GIT_COMMIT : string ;
166+ WS_URL : string ;
166167 turnstile : any ;
167168 adsEnabled : boolean ;
168169 PageOS : {
Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ export class Transport {
324324 ) {
325325 this . startPing ( ) ;
326326 this . killExistingSocket ( ) ;
327- const wsHost = window . location . host ;
327+ const wsHost = window . WS_URL ;
328328 const wsProtocol = window . location . protocol === "https:" ? "wss:" : "ws:" ;
329329 const workerPath = this . lobbyConfig . serverConfig . workerPath (
330330 this . lobbyConfig . gameID ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ export async function renderHtmlContent(htmlPath: string): Promise<string> {
2626 backgroundImageUrl : buildAssetUrl ( "images/background.webp" , assetManifest ) ,
2727 desktopLogoImageUrl : buildAssetUrl ( "images/OpenFront.webp" , assetManifest ) ,
2828 mobileLogoImageUrl : buildAssetUrl ( "images/OF.webp" , assetManifest ) ,
29+ wsUrl : JSON . stringify ( `${ process . env . SUBDOMAIN } .${ process . env . DOMAIN } ` ) ,
2930 } ) ;
3031}
3132
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ export default defineConfig(({ mode }) => {
101101 inject : {
102102 data : {
103103 gitCommit : JSON . stringify ( "DEV" ) ,
104+ wsUrl : JSON . stringify ( "localhost:9000" ) ,
104105 ...htmlAssetData ,
105106 } ,
106107 } ,
You can’t perform that action at this time.
0 commit comments