We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c262a0 commit 4e7eebdCopy full SHA for 4e7eebd
ellar_throttler/throttler_guard.py
@@ -60,8 +60,10 @@ def get_request_response(
60
return connection_host.get_client(), connection_host.get_response()
61
62
def get_tracker(self, connection: HTTPConnection) -> str:
63
- assert connection.client
64
- return connection.client.host
+ if connection.client:
+ return connection.client.host
65
+
66
+ return t.cast(str, connection.scope["server"][0])
67
68
def generate_key(self, context: IExecutionContext, suffix: str) -> str:
69
prefix = f"{get_name(context.get_class())}-{get_name(context.get_handler())}"
0 commit comments