chore: fix logging

This commit is contained in:
Chirag Aggarwal
2025-06-26 19:32:15 +05:30
parent 7e378a3a1e
commit 043cead66b
2 changed files with 6 additions and 3 deletions
-1
View File
@@ -1282,7 +1282,6 @@ App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
->inject('request')
->inject('response')
->action(function (string $projectId, string $provider, string $code, string $state, string $error, string $error_description, Request $request, Response $response) {
$domain = $request->getHostname();
$protocol = $request->getProtocol();
+6 -2
View File
@@ -46,8 +46,6 @@ class Origin extends Validator
Console::info('Origin: ' . $origin);
Console::info('Hostnames: ' . json_encode($this->hostnames, JSON_PRETTY_PRINT));
Console::info('Host: ' . $this->host);
$validator = new Hostname($this->hostnames);
Console::info('Valid Hostname? ' . $validator->isValid($this->host) ? 'Yes' : 'No');
Console::info('Schemes: ' . json_encode($this->schemes, JSON_PRETTY_PRINT));
Console::info('Scheme: ' . $this->scheme);
@@ -55,10 +53,16 @@ class Origin extends Validator
return true;
}
Console::info('we got here (1)');
if (!in_array($this->scheme, ['http', 'https'])) {
return false;
}
Console::info('we got here (2)');
$validator = new Hostname($this->hostnames);
Console::info('Valid Hostname? ' . ($validator->isValid($this->host) ? 'Yes' : 'No'));
return $validator->isValid($this->host);
}