feat(api/auth): switch-to-stateful-authentication (#5438)

This commit is contained in:
-LAN-
2024-06-21 12:39:07 +08:00
committed by GitHub
parent 26b6fd2236
commit 1336b844fd
8 changed files with 89 additions and 43 deletions

View File

@@ -140,7 +140,7 @@ def generate_string(n):
return result
def get_remote_ip(request):
def get_remote_ip(request) -> str:
if request.headers.get('CF-Connecting-IP'):
return request.headers.get('Cf-Connecting-Ip')
elif request.headers.getlist("X-Forwarded-For"):