I have RStudio (community edition) running behind a proxy using Caddy. I map RStudio
to a subdirectory like so:
proxy /rstudio rstudio:8787 {
without /rstudio
header_upstream Host {host}/rstudio
transparent
websocket
}
redir /rstudio /rstudio/ 307
(In this case Caddy and RStudio are running as separate docker images, so rstudio is the name of the Docker service)
This mostly works, but when I am not logged in to RStudio, and go to my.site/rstudio, it redirects to my.site/auth-sign-in, not my.site/rstudio/auth-sign-in.
I attempted to fix this by adding another redirect:
redir /auth-sign-in /rstudio/auth-sign-in 307
This works to get to the login page, but after I log in it then redirects to my.site/, not my.site/rstudio/. Is this an RStudio bug or is there something I am missing? I note a few similar cases with other proxy software on the old support site: apache case, nginx case.