Remove subdomain reserve check from server

This commit is contained in:
Marcel Pociot
2021-06-14 11:50:03 +02:00
parent eefd74e82c
commit aa08029fc3
4 changed files with 3 additions and 68 deletions

View File

@@ -77,12 +77,6 @@ class StoreSubdomainController extends AdminController
$this->subdomainRepository
->storeSubdomain($insertData)
->then(function ($subdomain) use ($httpConnection) {
if (is_null($subdomain)) {
$httpConnection->send(respond_json(['error' => 'The subdomain is already taken.'], 422));
$httpConnection->close();
return;
}
$httpConnection->send(respond_json(['subdomain' => $subdomain], 200));
$httpConnection->close();
});

View File

@@ -79,7 +79,7 @@ class TunnelMessageController extends Controller
protected function detectServerHost(Request $request): ?string
{
return Str::after($request->header('Host'), '.');
return Str::before(Str::after($request->header('Host'), '.'), ':');
}
protected function sendRequestToClient(Request $request, ControlConnection $controlConnection, ConnectionInterface $httpConnection)