remove more headers that are not needed
This commit is contained in:
parent
e5495628f3
commit
5a45d1d146
2 changed files with 4 additions and 5 deletions
|
@ -22,6 +22,8 @@ module.exports = async function(req, res, loginInfo) {
|
|||
// Check login
|
||||
const loginCheck = await loginHelper.checkLogin(loginInfo);
|
||||
if (loginCheck != null) {
|
||||
res.removeHeader('X-Powered-By');
|
||||
res.removeHeader('Date');
|
||||
res.writeHead(200, loginCheck[1]);
|
||||
return res.end(loginCheck[0]);
|
||||
}
|
||||
|
@ -143,13 +145,14 @@ module.exports = async function(req, res, loginInfo) {
|
|||
|
||||
osuPacketWriter.Announce(`Welcome back ${loginInfo.username}!`);
|
||||
|
||||
res.removeHeader('X-Powered-By');
|
||||
res.removeHeader('Date');
|
||||
// Complete login
|
||||
res.writeHead(200, {
|
||||
"cho-token": NewUser.uuid,
|
||||
"cho-protocol": global.protocolVersion,
|
||||
"Connection": "keep-alive",
|
||||
"Keep-Alive": "timeout=5, max=100",
|
||||
"Content-Type": "text/html; charset=UTF-8"
|
||||
});
|
||||
res.end(osuPacketWriter.toBuffer, () => {
|
||||
consoleHelper.printBancho(`User login finished, took ${Date.now() - loginStartTime}ms. [User: ${loginInfo.username}]`);
|
||||
|
|
|
@ -34,11 +34,9 @@ function incorrectLoginResponse() {
|
|||
return [
|
||||
osuPacketWriter.toBuffer,
|
||||
{
|
||||
'cho-token': 'No',
|
||||
'cho-protocol': global.protocolVersion,
|
||||
'Connection': 'keep-alive',
|
||||
'Keep-Alive': 'timeout=5, max=100',
|
||||
'Content-Type': 'text/html; charset=UTF-8'
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -50,11 +48,9 @@ function requiredPWChangeResponse() {
|
|||
return [
|
||||
osuPacketWriter.toBuffer,
|
||||
{
|
||||
'cho-token': 'No',
|
||||
'cho-protocol': global.protocolVersion,
|
||||
'Connection': 'keep-alive',
|
||||
'Keep-Alive': 'timeout=5, max=100',
|
||||
'Content-Type': 'text/html; charset=UTF-8'
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue