Skip to content

Commit

Permalink
Happy linter
Browse files Browse the repository at this point in the history
  • Loading branch information
SiebeVE committed Mar 13, 2024
1 parent f2092a6 commit f682aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/Server/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function addControlConnectionRoute(): WsServer

protected function addAdminRoutes()
{
$adminCondition = 'request.headers.get("Host") matches "/^' . config('expose.admin.subdomain') . '\\\\./i"';
$adminCondition = 'request.headers.get("Host") matches "/^'.config('expose.admin.subdomain').'\\\\./i"';

$this->router->get('/', RedirectToUsersController::class, $adminCondition);
$this->router->get('/users', ListUsersController::class, $adminCondition);
Expand Down Expand Up @@ -173,7 +173,7 @@ protected function addAdminRoutes()

protected function addValidateTunnel()
{
$localCondition = 'request.headers.get("Host") matches "/^' . $this->host . ':' . $this->port . '$/i"';
$localCondition = 'request.headers.get("Host") matches "/^'.$this->host.':'.$this->port.'$/i"';

$this->router->get('/validate-tunnel', ValidateTunnelController::class, $localCondition);

Expand Down
3 changes: 1 addition & 2 deletions app/Server/Http/Controllers/ValidateTunnelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function handle(Request $request, ConnectionInterface $httpConnection)

// Also allow the admin dashboard
$adminSubdomain = config('expose.admin.subdomain');
if ($domain === $adminSubdomain . '.' . $hostname) {
if ($domain === $adminSubdomain.'.'.$hostname) {
$this->isSuccessful($httpConnection);

return;
Expand Down Expand Up @@ -92,7 +92,6 @@ public function handle(Request $request, ConnectionInterface $httpConnection)
return;
}


$httpConnection->send(respond_json(['exists' => false, 'error' => 'no_tunnel_found'], 404));
$httpConnection->close();
}
Expand Down

0 comments on commit f682aaf

Please sign in to comment.