remove sleep (#1797)
This commit is contained in:
parent
ae9eb314cc
commit
b9db3eafe0
1 changed files with 0 additions and 2 deletions
|
|
@ -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"},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue