The goal would be to have access to the ip of the client connecting to the bokeh server, so that to display adapted/differentiated content based on the ip of the client and/or log the activity.
One very simple example about client activity is that at one point in time, to my knowledge there is no way to know who is connected to the server through the bokeh app framework. You do have in the logs the “GET” request showing the IP at the connection phase, but you don’t get to know who is disconnecting, and therefore who is still there.
However, unfortunately, looking at the documentation (https://bokeh.pydata.org/en/latest/docs/user_guide/server.html) It seems only the request arguments are available.
Diving in the code (server/application_context.py), it’s practically done by creating a _RequestProxy(request) which mirrors the initial request object, dropping all but the arguments.
Adding to the proxy through the remote_ip field seems to do the job from what I see.
Would passing the ip through indeed create some incompatibility issues ? or is the documentation warning not applying to the ip and in that case could this feature be added to future bokeh release ?
Thanks in advance,