diff --git a/play.pokemonshowdown.com/crossdomain.php b/play.pokemonshowdown.com/crossdomain.php index cde6bc68b..e31ea6244 100644 --- a/play.pokemonshowdown.com/crossdomain.php +++ b/play.pokemonshowdown.com/crossdomain.php @@ -14,7 +14,7 @@ if (preg_match('/^([a-z0-9-_\.]*?)\.psim\.us$/', $host, $m)) { die; // not authorised } -$protocol = @$_REQUEST['protocol'] ?? 'http:'; +$protocol = @$_REQUEST['protocol'] === 'https:' ? 'https:' : 'http:'; $portType = ($protocol === 'http:' ? 'port' : 'httpsport'); if ($config['host'] !== 'showdown') {