X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Fui-server%2FUIServerUtils.ts;fp=src%2Fcharging-station%2Fui-server%2FUIServerUtils.ts;h=2b0bf3de152253e5aec13d33c817cc861ac5a365;hb=5edd8ba0f8978cfb3ca9d80f299d9748c6c5970e;hp=cada139961dd0044686074eecbb158a0b6c16e7e;hpb=e63001474c7c4f2752be2985dc891594ac5f691a;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ui-server/UIServerUtils.ts b/src/charging-station/ui-server/UIServerUtils.ts index cada1399..2b0bf3de 100644 --- a/src/charging-station/ui-server/UIServerUtils.ts +++ b/src/charging-station/ui-server/UIServerUtils.ts @@ -11,7 +11,7 @@ export class UIServerUtils { public static handleProtocols = ( protocols: Set, // eslint-disable-next-line @typescript-eslint/no-unused-vars - request: IncomingMessage + request: IncomingMessage, ): string | false => { let protocol: Protocol; let version: ProtocolVersion; @@ -25,8 +25,8 @@ export class UIServerUtils { } logger.error( `${logPrefix( - ' UI WebSocket Server |' - )} Unsupported protocol: ${protocol} or protocol version: ${version}` + ' UI WebSocket Server |', + )} Unsupported protocol: ${protocol} or protocol version: ${version}`, ); return false; }; @@ -43,7 +43,7 @@ export class UIServerUtils { const protocolIndex = protocolStr.indexOf(Protocol.UI); const protocol = protocolStr.substring( protocolIndex, - protocolIndex + Protocol.UI.length + protocolIndex + Protocol.UI.length, ) as Protocol; const version = protocolStr.substring(protocolIndex + Protocol.UI.length) as ProtocolVersion; return [protocol, version]; @@ -53,7 +53,7 @@ export class UIServerUtils { const isLoopbackRegExp = new RegExp( // eslint-disable-next-line no-useless-escape /^localhost$|^127(?:\.\d+){0,2}\.\d+$|^(?:0*\:)*?:?0*1$/, - 'i' + 'i', ); return isLoopbackRegExp.test(address); }