Skip to content

Commit

Permalink
added logs for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
alimaktabi committed Oct 26, 2024
1 parent 1b7d75e commit 5e3dabf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions telegram/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

import telebot
import requests
import logging


logger = logging.getLogger(__name__)


def get_telegram_safe_ips():
Expand All @@ -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
Expand Down

0 comments on commit 5e3dabf

Please sign in to comment.