@@ -12,6 +12,10 @@ $success = '';
|
|||||||
// Detect the correct callback URL
|
// Detect the correct callback URL
|
||||||
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
|
||||||
$host = $_SERVER['HTTP_HOST'] ?? 'localhost:8080';
|
$host = $_SERVER['HTTP_HOST'] ?? 'localhost:8080';
|
||||||
|
// If no port in host and not standard port, add it
|
||||||
|
if (strpos($host, ':') === false && !in_array($_SERVER['SERVER_PORT'] ?? 80, [80, 443])) {
|
||||||
|
$host .= ':' . $_SERVER['SERVER_PORT'];
|
||||||
|
}
|
||||||
$callbackUrl = "$scheme://$host/login.php";
|
$callbackUrl = "$scheme://$host/login.php";
|
||||||
|
|
||||||
if (isset($_GET['auth'])) {
|
if (isset($_GET['auth'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user