From 348e4dc21baef8eaeb33027ccd3e3ab274473712 Mon Sep 17 00:00:00 2001 From: Pingu Date: Fri, 17 Jul 2026 20:11:18 +0000 Subject: [PATCH] =?UTF-8?q?Proxy.php=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Proxy.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Proxy.php diff --git a/Proxy.php b/Proxy.php new file mode 100644 index 0000000..62ac37d --- /dev/null +++ b/Proxy.php @@ -0,0 +1,55 @@ += 200 && $httpCode < 300) { + file_put_contents($cacheFile, $response); + } else { + header('HTTP/1.1 500 Internal Server Error'); + header('Content-Type: application/json; charset=utf-8'); + echo json_encode([ + 'error' => 'Konnte Daten nicht von der Cloud laden.', + 'http_status' => $httpCode, + 'curl_error' => $curlError ? $curlError : 'Kein spezifischer cURL-Fehler. Cloud antwortete nicht mit HTTP 200.' + ]); + exit; + } +} + +header('Content-Type: application/json; charset=utf-8'); +echo $response; \ No newline at end of file