Prefix the shinyproxy URL (localhost:8080/shinyproxy/app....)

Hello,

I have a problem when I try to access shinyproxy (index page) through our web portal :
=> The web page can’t load css and js files. So, I only see the list of my apps on a white screen with no CSS, and the apps links aren’t working (I can’t launch any app).
The app is trying to load its resources from https://portal/webjars/ and portal/css/ …etc, instead of http://shinyperxyserver:8080/webjars (css, JS).

Our portal administrator told me that he can fix this by redirecting these requests to the shinyproxyserver if there is a prefix to theses paths (/webjarss/*, /js/, /css/). But since the app is loading the resources at “/”, he can’t do it.

Is there something I can do to run shinyproxy on abcd:8080/something/ ? the apps would be available at abcd:8080/something/app/my_app.
If this is not possible, is there anything else I can do to let shinyproxy access to these resources?

I hope I was clear enough. I remain at your disposal for any further information.

Thank you a lot for your help.

Tarik

Hi

If I understand correctly, you want to run ShinyProxy on a sub-path of your domain?
In that case you can configure the context-path, see: https://shinyproxy.io/documentation/configuration/#hide-navbar

Hi
I have a similar problem (need to set up sub-path).
Here are relevant parts of my application.yml:

proxy:
  title: ShinyProxy
  landing-page: /
  ...
  server:
    useForwardHeaders: true
    servlet:
      context-path: /shinyproxy
  ...

with this settings login page is still at http://fqdn:8080/login and once I login it redirects me to http://fqdn:8080/shinyproxy, which is not there and fails with 404.

What I expected:

  • Login page: fqdn:8080/shinyproxy/login
  • Once logged in, all the pages has /shinyproxy/ in front

Of course, I can install nginx/apache/etc. to proxy pass requests, but it seems that it can be done with shinyproxy itself.

Am I missing something?

Thanks for any help :slight_smile:

Found a problem. server block should be outside of proxy block.

server:
  useForwardHeaders: true
  contextPath: /shinyproxy
  servlet:
    context-path: /shinyproxy

proxy:
  title: ShinyProxy
  landing-page: /
  ...