Add OPTIONS handler for Telegram webhook
This commit is contained in:
@@ -218,6 +218,9 @@ $app->post('/site/approve/{id_trx}', [$siteController, 'approve']);
|
|||||||
// Telegram Bot Routes
|
// Telegram Bot Routes
|
||||||
$telegramBotController = new \App\Controllers\TelegramBotController();
|
$telegramBotController = new \App\Controllers\TelegramBotController();
|
||||||
$app->post('/telegram/webhook', [$telegramBotController, 'webhook']);
|
$app->post('/telegram/webhook', [$telegramBotController, 'webhook']);
|
||||||
|
$app->options('/telegram/webhook', function (Request $request, Response $response) {
|
||||||
|
return $response->withStatus(200);
|
||||||
|
});
|
||||||
|
|
||||||
// Run app
|
// Run app
|
||||||
$app->run();
|
$app->run();
|
||||||
|
|||||||
Reference in New Issue
Block a user