cookie: false

This commit is contained in:
2020-10-23 17:12:41 +02:00
parent c8dd780fdf
commit 7d88f1b910
4 changed files with 6 additions and 9 deletions
+2 -6
View File
@@ -32,13 +32,9 @@ export class RPCSocket<Ifc extends T.RPCInterface = T.RPCInterface> implements I
* @param server Server address
* @param tls @default false use TLS
*/
constructor(public port:number, private server: string, private conf:T.SocketConf = { tls: false }){
constructor(public port:number, private server: string, conf:T.SocketConf = { tls: false }){
Object.defineProperty(this, 'socket', {value: undefined, writable: true})
if(conf.tls){
this.protocol = "https:"
}else{
this.protocol = "http:"
}
this.protocol = conf.tls ? "https:" : "http:"
}
/**
+3 -1
View File
@@ -38,7 +38,9 @@ export class PromiseIO {
}
listen(port: number) {
this.httpServer!.listen(port)
this.io!.listen(port, {
cookie: false
})
}
on(eventName: string, listener: T.AnyFunction) {
-1
View File
@@ -72,7 +72,6 @@ export type exportT = {
[group in string]: {}
}
//This probably has lots of issues
export type RPCDefinitions<Ifc extends RPCInterface> = {
[grp in keyof Ifc]:( { [rpc in keyof Ifc[grp]]: RPC<rpc, Ifc[grp][rpc]> }[keyof Ifc[grp]] )[]
}