From 5831562a0bc80a2fbe1e2f30d102116b8ce42df9 Mon Sep 17 00:00:00 2001 From: Marknl Date: Tue, 12 Jul 2022 10:47:58 +0200 Subject: [PATCH] Removed fancy showLogoutURL() When running Racktables in a docker container, behind a nginx reversed proxy. The logout URL doesn't work. This is because there is no "server_name" available. This fixes that issue. Also, there's no need to generate such a "fancy" logout URL. --- wwwroot/inc/interface.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wwwroot/inc/interface.php b/wwwroot/inc/interface.php index 3a11dab3d..efbe35cc2 100644 --- a/wwwroot/inc/interface.php +++ b/wwwroot/inc/interface.php @@ -71,13 +71,6 @@ 'date' => '[T] date' ); -function showLogoutURL () -{ - $https = (isset ($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : ''; - $port = (! in_array ($_SERVER['SERVER_PORT'], array (80, 443))) ? ':' . $_SERVER['SERVER_PORT'] : ''; - printf ('http%s://logout@%s%s%s?logout', $https, $_SERVER['SERVER_NAME'], $port, $_SERVER['PHP_SELF']); -} - $quick_links = NULL; // you can override this in your local.php, but first initialize it with getConfiguredQuickLinks() function renderQuickLinks() @@ -104,9 +97,7 @@ function renderInterfaceHTML ($pageno, $tabno, $payload) echo '
'; echo '
'; echo mkA ($remote_displayname, 'myaccount', NULL, 'default'); - echo ' [ logout ]
'; // greeting + echo ' [ logout ]
'; echo getConfigVar ('enterprise') . ' RackTables '; echo '' . CODE_VERSION . ''; renderQuickLinks();