I'm working with responder the python web framework and trying to get remote_addr.
I looked req.header but there's no data. No client or remote_addr field in req.
And I googled for a while but I didn't get any information.
How can I solve this problem?
Thank you.
First argument of the handler (declare it req commonly) stores starlette.requests.Request in req._starlette.
So we can get remote_addr by looking at req._starlette.client.host.
Additionally, we can get remote_addr from WebSocket object by ws.scope["client"][0] (index 1 is the port).
How to get remote_addr with responder?