Skip to content

Commit

Permalink
Simplify code.
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed May 4, 2019
1 parent 2d0fad5 commit ccedd63
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Server/CheckOrigin.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ protected function verifyOrigin(ConnectionInterface $connection, RequestInterfac
$header = (string) $request->getHeader('Origin')[0];
$origin = \parse_url($header, PHP_URL_HOST) ?: $header;

if (! \in_array($origin, $this->allowedOrigins)) {
return false;
}

return true;
return \in_array($origin, $this->allowedOrigins);
}
}

0 comments on commit ccedd63

Please sign in to comment.