From 4d341f38607b66f9211a35b8ce3756a61b11b333 Mon Sep 17 00:00:00 2001 From: mwpn Date: Mon, 26 Jan 2026 09:36:00 +0700 Subject: [PATCH] Add OPTIONS handler for Telegram webhook --- public/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/index.php b/public/index.php index 052a2ff..3eeb6b8 100644 --- a/public/index.php +++ b/public/index.php @@ -218,6 +218,9 @@ $app->post('/site/approve/{id_trx}', [$siteController, 'approve']); // Telegram Bot Routes $telegramBotController = new \App\Controllers\TelegramBotController(); $app->post('/telegram/webhook', [$telegramBotController, 'webhook']); +$app->options('/telegram/webhook', function (Request $request, Response $response) { + return $response->withStatus(200); +}); // Run app $app->run();