File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ export class HostLobbyModal extends LitElement {
596596 // join lobby
597597 const cookieDurationSec = 60 * 60 * 6 ; //Store cookie for max 6 hours
598598 // getting error here from lobby.hostToken
599- document . cookie = `hostToken=${ lobby . hostToken } ; Max-Axe =${ cookieDurationSec } ; Path=/` ;
599+ document . cookie = `hostToken=${ lobby . hostToken } ; Max-Age =${ cookieDurationSec } ; Path=/` ;
600600 } )
601601 . then ( ( ) => {
602602 this . dispatchEvent (
@@ -818,7 +818,8 @@ export class HostLobbyModal extends LitElement {
818818 body : JSON . stringify ( { hostToken : hostToken } ) ,
819819 } ,
820820 ) ;
821- document . cookie = "hostToken=;Max-Age=-1" ; //delete cookie
821+ const secure = location . protocol === "https:" ? "; Secure" : "" ;
822+ document . cookie = `hostToken=; Max-Age=0; Path=/; SameSite=Strict${ secure } ` ; //delete cookie
822823 return response ;
823824 }
824825
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ export async function startWorker() {
175175
176176 if ( hostToken !== game . getHostToken ( ) ) {
177177 log . info ( `cannot start private game ${ game . id } , requestor is not host` ) ;
178- res . status ( 403 ) . json ( { success : false } ;
178+ res . status ( 403 ) . json ( { success : false } ) ;
179179 return ;
180180 }
181181 game . start ( ) ;
You can’t perform that action at this time.
0 commit comments