mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-10 12:32:34 +02:00
remove sleep (#1797)
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import asyncio
|
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, List, Tuple, Union
|
from typing import Any, List, Tuple, Union
|
||||||
from urllib.parse import parse_qs
|
from urllib.parse import parse_qs
|
||||||
@@ -215,7 +214,6 @@ def add_ip_block_middleware(app: FastAPI):
|
|||||||
request.client.host in settings.lnbits_blocked_ips
|
request.client.host in settings.lnbits_blocked_ips
|
||||||
and request.client.host not in settings.lnbits_allowed_ips
|
and request.client.host not in settings.lnbits_allowed_ips
|
||||||
):
|
):
|
||||||
await asyncio.sleep(5)
|
|
||||||
return JSONResponse(
|
return JSONResponse(
|
||||||
status_code=403, # Forbidden
|
status_code=403, # Forbidden
|
||||||
content={"detail": "IP is blocked"},
|
content={"detail": "IP is blocked"},
|
||||||
|
Reference in New Issue
Block a user