feat: add WEBHOOK_IP to allow Telegram bypass DNS lookup for webhook (#2894)
* feat: add WEBHOOK_IP to allow Telegram bypass DNS lookup for webhook * style: ruff format main.py --------- Co-authored-by: Dmitry Lunin <br@slack.ru>
This commit is contained in:
@@ -607,6 +607,7 @@ async def main():
|
||||
secret_token=settings.WEBHOOK_SECRET_TOKEN,
|
||||
drop_pending_updates=False, # Обрабатываем накопившиеся обновления
|
||||
allowed_updates=allowed_updates,
|
||||
**({'ip_address': settings.WEBHOOK_IP} if settings.WEBHOOK_IP else {}),
|
||||
)
|
||||
stage.log(f'Webhook установлен: {webhook_url}')
|
||||
stage.log(f'Allowed updates: {", ".join(sorted(allowed_updates)) if allowed_updates else "all"}')
|
||||
|
||||
Reference in New Issue
Block a user