mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: fix logging
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user