Skip to content

Commit

Permalink
Merge pull request #639 from UnitapApp/feature/telegram/implementation
Browse files Browse the repository at this point in the history
removed telegram ip safelist validation
  • Loading branch information
alimaktabi authored Oct 26, 2024
2 parents e022f58 + 4d19119 commit ccd1bf3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions telegram/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def get_telegram_safe_ips():

@csrf_exempt
def telebot_respond(request):
client_ip = request.META["REMOTE_ADDR"]
# client_ip = request.META["REMOTE_ADDR"]

telegram_ips = get_telegram_safe_ips
# telegram_ips = get_telegram_safe_ips

# Validate the request's IP address against Telegram's IP ranges
if client_ip not in telegram_ips:
raise PermissionDenied("Invalid IP address")
# # Validate the request's IP address against Telegram's IP ranges
# if client_ip not in telegram_ips:
# raise PermissionDenied("Invalid IP address")

if (
request.headers.get("X-Telegram-Bot-Api-Secret-Token")
Expand Down

0 comments on commit ccd1bf3

Please sign in to comment.