Skip to content

Commit

Permalink
Allow to start without password
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Apr 24, 2024
1 parent 6e37877 commit cddedb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MadelineProtoExtensions/SystemApiExtensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function healthcheck(): array
foreach ($sessions as $sessionKey => $session) {
$instance = $this->client->instances[$sessionKey];
if ($instance->getAuthorization() === API::LOGGED_IN) {
$results[$sessionKey] = $instance->fullGetSelf();
$results[$sessionKey] = $instance->getSelf();
}
}
return $results;
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct()
$this->ipWhitelist = (array)Config::getInstance()->get('api.ip_whitelist', []);
$this->passwords = Config::getInstance()->get('api.passwords', []);
if (!$this->ipWhitelist && !$this->passwords) {
throw new \InvalidArgumentException('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker');
warning('API is unprotected! Please specify IP_WHITELIST or PASSWORD in .env.docker');
}
}

Expand Down

0 comments on commit cddedb0

Please sign in to comment.