I need to send a parameter to bokeh serve on header as this parameter is very long (7000+ byte). Can bokeh serve get the parameter on HTTP header? I tried to send a HTTP request with a parameter on header to bokeh serve and get the parameter by “curdoc().session_context.request.arguments”, nothing was found.
No, Bokeh server apps only have access to URL parameters, e.g ?foo=10, etc. Unfortunately sending the full HTTP request is not compatible with --num-procs or with running multiple servers behind a load balancer, because the process that gets the initial request is not guaranteed to be the same process that actually runs the app code. You can see the lengthy discussion here:
I outlined a generic, policy-based mechanism that would let users choose how state is shared, and not impose any specific requirements. I think that is the best approach, and I'd be happy to help anyone that wants to work on it get started.
I need to send a parameter to bokeh serve on header as this parameter is very long (7000+ byte). Can bokeh serve get the parameter on HTTP header? I tried to send a HTTP request with a parameter on header to bokeh serve and get the parameter by "curdoc().session_context.request.arguments", nothing was found.