mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-06 06:55:00 +00:00
Update index.php
This commit is contained in:
parent
10c91d5045
commit
895cc03d31
|
@ -662,8 +662,10 @@ if (!$is_httpproxy) {
|
|||
if ($result['success']) {
|
||||
$response = str_replace(RELAY_PROXY_PASS, sprintf("%s://%s", $_SERVER['REQUEST_SCHEME'], $_SERVER['HTTP_HOST']), $result['result']['data']);
|
||||
if (RELAY_ENABLE_JS_REDIRECT) {
|
||||
if (strpos(strtolower(trim(substr($response, 0, 16))), "<!doctype html") === 0) {
|
||||
$response .= "<script>setTimeout(function() { var a = document.createElement('a'); a.href = '" . $proxy_url . "'; document.body.appendChild(a); a.click(); }, 3000);</script>";
|
||||
}
|
||||
}
|
||||
exit($response);
|
||||
} else {
|
||||
http_response_code(500);
|
||||
|
|
Loading…
Reference in New Issue
Block a user