Pass headers from reverse proxy to app

Hi,

due to a quite complex authentication scenario (we need multi tenancy), we want to switch from openid auth to customHeader auth and put a reverse proxy in front of our ShinyProxy deployment doing the actual authentication.

We need to pass a bit more info than only REMOTE_USER and groups to ShinyProxy / the individual apps (like some token we get from the authentication) and I’m not quite sure how to do that. I can’t find anything in the docs on how to pass a http header ShinyProxy receives from the reveres proxy down to the app (preferably as an environmental variable). Is that possible at all?

Hi

When a request is sent to an app running in ShinyProxy, the headers are sent as is (except if you configure ShinyProxy to send custom headers). Therefore, if the reverse proxy adds the header to all requests, they should be readable by the app itself.

For now, there is not a way to convert these headers into an environment variable. It would technically be possible to implement such a feature, but in our experience, reading out the headers in the app is usually fine as well.