diff --git a/telegram/views.py b/telegram/views.py index df8d793..048cd74 100644 --- a/telegram/views.py +++ b/telegram/views.py @@ -17,6 +17,10 @@ import telebot import requests +import logging + + +logger = logging.getLogger(__name__) def get_telegram_safe_ips(): @@ -42,6 +46,8 @@ def telebot_respond(request): # if client_ip not in telegram_ips: # raise PermissionDenied("Invalid IP address") + logger.info(request.headers) + if ( request.headers.get("X-Telegram-Bot-Api-Secret-Token") != settings.TELEGRAM_BOT_API_SECRET