[chore] Fix type errors in server.js
This commit is contained in:
parent
afc3bfb740
commit
ab2427142c
|
@ -381,7 +381,6 @@ if (!disableCsrf) {
|
||||||
getSecret: getCsrfSecret,
|
getSecret: getCsrfSecret,
|
||||||
cookieName: 'X-CSRF-Token',
|
cookieName: 'X-CSRF-Token',
|
||||||
cookieOptions: {
|
cookieOptions: {
|
||||||
httpOnly: true,
|
|
||||||
sameSite: 'strict',
|
sameSite: 'strict',
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
|
@ -831,7 +830,7 @@ function createHttpsServer(url) {
|
||||||
}, app);
|
}, app);
|
||||||
server.on('error', reject);
|
server.on('error', reject);
|
||||||
server.on('listening', resolve);
|
server.on('listening', resolve);
|
||||||
server.listen(url.port || 443, url.hostname);
|
server.listen(Number(url.port || 443), url.hostname);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -846,7 +845,7 @@ function createHttpServer(url) {
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
server.on('error', reject);
|
server.on('error', reject);
|
||||||
server.on('listening', resolve);
|
server.on('listening', resolve);
|
||||||
server.listen(url.port || 80, url.hostname);
|
server.listen(Number(url.port || 80), url.hostname);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue