mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 21:15:13 +00:00
Refactor the interface rate limiter implementation (#1072)
* Refactor the interface rate limiter implementation * Update deps
This commit is contained in:
@@ -29,6 +29,7 @@ def get_request_ip(request: Request) -> str:
|
||||
# 忽略 pytest
|
||||
if request.client.host == 'testclient':
|
||||
return '127.0.0.1'
|
||||
|
||||
return request.client.host
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user