mirror of
https://github.com/librespeed/speedtest.git
synced 2026-08-03 22:28:24 +00:00
Update docker/ui.php
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
This commit is contained in:
parent
0274f6e587
commit
6d31010feb
1 changed files with 3 additions and 7 deletions
|
|
@ -25,13 +25,9 @@ var SPEEDTEST_SERVERS=[];
|
|||
$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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue