This commit is contained in:
Simon Gruber
2026-05-11 08:15:49 +02:00
parent 8615e8b78b
commit dfb258c90c
7 changed files with 318 additions and 8 deletions
+2 -2
View File
@@ -22,14 +22,14 @@ const requestListener = function (clientReq, clientRes) {
if (providedSecret !== PROXY_SECRET) {
console.warn(`Unauthorized access: Invalid secret`);
clientRes.writeHead(403);
clientRes.end(JSON.stringify({ error: "Forbidden: Invalid access key" }));
clientRes.end();
return;
}
if (!GIPHY_API_KEY) {
console.error("GIPHY_API_KEY is not configured.");
clientRes.writeHead(500);
clientRes.end(JSON.stringify({ error: "Server configuration error" }));
clientRes.end();
return;
}