Skip to content

Commit

Permalink
Update docker/ui.php
Browse files Browse the repository at this point in the history
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 0274f6e commit 6d31010
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docker/ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@ function I(i){return document.getElementById(i);}
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";

// Retrieve the host (e.g., www.example.com)
$host = $_SERVER['HTTP_HOST'];

// Retrieve the URI (path and query string)
$uri = $_SERVER['REQUEST_URI'];

// Combine them to get the full URL
$url = $protocol . $host . $uri;
$host = filter_var($_SERVER['HTTP_HOST'], FILTER_SANITIZE_STRING);
$uri = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
$url = $protocol . htmlspecialchars($host) . htmlspecialchars($uri);
array_unshift($servers,
[
"name"=> "This Server",
Expand Down

0 comments on commit 6d31010

Please sign in to comment.