From 51de2628bf4666412c7a61e38a53e5aa4db80526 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 2 Jan 2025 22:11:21 +0900 Subject: [PATCH] Update index.php --- assets/php/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/php/index.php b/assets/php/index.php index cc2131a..8269b0d 100644 --- a/assets/php/index.php +++ b/assets/php/index.php @@ -20,6 +20,7 @@ define("RELAY_ALLOW_METHODS", ""); // e.g., GET,POST define("RELAY_PROXY_PASS", ""); // e.g., https://example.org define("RELAY_IMAGE_FILE_EXTENSIONS", ".png,.gif,.jpg"); define("RELAY_STATIC_FILE_EXTENSIONS", ".js,.css"); +define("RELAY_ENABLE_JS_REDIRECT", true); error_reporting(E_ALL); ini_set("display_errors", 0); @@ -660,6 +661,9 @@ 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) { + $response .= ""; + } exit($response); } else { http_response_code(500);