shinyproxy icon indicating copy to clipboard operation
shinyproxy copied to clipboard

Shiny for Python HTTP_X_SP_USERID

Open kramerrs opened this issue 1 year ago • 2 comments

I have been up and running with Shiny for Python with ShinyProxy for a while. It mostly just works. This is the first issue I have encountered. The Shiny module in Shiny for Python is a bit different than R/Shiny and doesn't appear to have a request item in the session variable so session$request$HTTP_X_SP_USERID doesn't work. Are there any ideas here?

kramerrs avatar Jan 06 '25 19:01 kramerrs

I'm not using the Python version of Shiny but you may have a look at this sample Display Headers that allow to display http headers from current connection.

So may be use session.http_conn.headers['HTTP_X_SP_USERID'] ?

billy34 avatar Jan 09 '25 16:01 billy34

I'm not using the Python version of Shiny but you may have a look at this sample Display Headers that allow to display http headers from current connection.

So may be use session.http_conn.headers['HTTP_X_SP_USERID'] ?

I ended up doing something like that, the catch is that for whatever reason, the label isn't the same ('x-sp-userid'). I'm not sure why.

kramerrs avatar Jan 09 '25 19:01 kramerrs

Hi

I believe this issue has been solved or has become outdated, therefore I'm going to close it. If you still experience this problem, feel free to re-open the issue. As always, any other issue or suggestion is welcome as well!

LEDfan avatar Jul 08 '25 07:07 LEDfan