mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-19 06:44:03 -04:00
Fix a fast_cgi bug
This commit is contained in:
@@ -13,6 +13,7 @@ If adding multiple mods, enter them in an array separated by |, such as DOCKER_M
|
||||
# Usage
|
||||
|
||||
Navigate to `dashboard.domain.com` from your LAN to view the dashboard
|
||||
|
||||
Note: The application discovery works best when the container names match the `proxy-conf` files
|
||||
|
||||
# Example
|
||||
|
||||
@@ -16,7 +16,7 @@ def find_apps():
|
||||
continue
|
||||
file = open(file_path, "r")
|
||||
content = file.read()
|
||||
results = re.finditer(r"(\s+)set \$upstream_app (?P<name>\S+?);(\s+)set \$upstream_port (?P<port>\d+);\n(\s+)set \$upstream_proto (?P<proto>\w+);", content)
|
||||
results = re.finditer(r"(\s+)set \$upstream_app (?P<name>\S+?);.*\n(\s+)set \$upstream_port (?P<port>\d+);.*\n(\s+)set \$upstream_proto (?P<proto>\w+);.*", content)
|
||||
for result in results:
|
||||
params = result.groupdict()
|
||||
app = f"{params['proto']}://{params['name']}:{params['port']}"
|
||||
@@ -46,4 +46,4 @@ with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
|
||||
discovered_apps[app]["status"] = future.result()
|
||||
discovered_apps[app]["locations"] = list(apps[app])
|
||||
|
||||
print(json.dumps(discovered_apps, sort_keys=True))
|
||||
print(json.dumps(discovered_apps, sort_keys=True))
|
||||
|
||||
@@ -81,7 +81,8 @@
|
||||
<div class="wrap-general">
|
||||
HTML;
|
||||
}
|
||||
$access = shell_exec("cat /config/log/nginx/access.log | goaccess -a -o html --html-prefs='{\"theme\":\"darkGray\"}' --log-format COMBINED --geoip-database=/config/geoip2db/GeoLite2-City.mmdb -");
|
||||
$geodb = file_exists('/config/geoip2db/GeoLite2-City.mmdb') ? '--geoip-database=/config/geoip2db/GeoLite2-City.mmdb' : '';
|
||||
$access = shell_exec("cat /config/log/nginx/access.log | goaccess -a -o html --html-prefs='{\"theme\":\"darkGray\"}' --log-format COMBINED ".$geodb." -");
|
||||
$status = GetStatus();
|
||||
echo str_replace("<div class='wrap-general'>", $status, $access);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user