Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shiny for Python HTTP_X_SP_USERID #542

Open
kramerrs opened this issue Jan 6, 2025 · 2 comments
Open

Shiny for Python HTTP_X_SP_USERID #542

kramerrs opened this issue Jan 6, 2025 · 2 comments

Comments

@kramerrs
Copy link

kramerrs commented Jan 6, 2025

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?

@billy34
Copy link

billy34 commented Jan 9, 2025

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'] ?

@kramerrs
Copy link
Author

kramerrs commented Jan 9, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants