[chore] Rename local variable, use strict comparison.

This commit is contained in:
Cohee 2024-10-09 01:46:07 +03:00
parent 3e9d0cc1ad
commit 07d6808e4e
1 changed files with 4 additions and 4 deletions

View File

@ -655,13 +655,13 @@ async function basicUserLogin(request) {
return false;
}
const auth_header = request.get('Authorization');
if (!auth_header) {
const authHeader = request.get('Authorization');
if (!authHeader) {
return false;
}
const parts = auth_header.split(' ');
if (!parts || parts.length < 2 || parts[0].toLowerCase() != 'basic') {
const parts = authHeader.split(' ');
if (!parts || parts.length < 2 || parts[0].toLowerCase() !== 'basic') {
return false;
}