Skip to content

Commit

Permalink
fix(server): don't check to the correct server port
Browse files Browse the repository at this point in the history
This should prevent issues with an proxy port.

fix #333
  • Loading branch information
mheob committed Aug 21, 2020
1 parent aa73d20 commit eee3398
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Utils/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ public static function setHost(): void {
$host = $_SERVER['HTTP_HOST'] ?? '';
// phpcs:enable

if ( ! $port || ( '80' !== $port && '443' !== $port )
|| '' === $host || 'localhost' === $host || '127.0.01' === $host ) {
if ( ! $port || ! $host || '' === $host || 'localhost' === $host || '127.0.01' === $host ) {
self::$host = 'localhost';
return;
}
Expand Down

0 comments on commit eee3398

Please sign in to comment.