Closed hcstubbe closed 1 year ago
"Unfortunately, the automatic redirect from http to https"
That's pure Traefik features, has nothing to do with Shinyproxy.
here is the example for traefik labels.
The key is you need to define two routers, shiny-http and shiny-https. on router shiny-http set middlewareto https-redirect.
- traefik.http.routers.shiny-http.middlewares=https-redirect
- traefik.http.routers.shiny-http.rule=Host(`shiny.swarm.youdomain.com`)
- traefik.http.routers.shiny-https.rule=Host(`shiny.swarm.youdomain.com`)
- traefik.http.routers.shiny-https.tls=true
- traefik.http.services.shiny-https.loadbalancer.server.port=8080
- traefik.http.services.shiny-https.loadbalancer.sticky.cookie=true
Hi, as I understand, @ziyunxiao provides the answer to the question (thanks btw!) therefore I'm going to close this issue. If you encounter any other issue with ShinyProxy, feel free to open a new issue.
I was following this great tutorial to set up a shinyproxy (v.2.4.1) on docker-swarm using traefik (v.2.2) with keycloak for authentication on an ubuntu 20.04 LTS server. For some reason, I do not get to work the https redirect for the shinyproxy. I tried this with and without the keycloak authentication.
https redirect works for keycloak.app.example.com and manually adding https in to my url in the browser after log-in works (e.g. replacing http by https in the adressbar: https://shinyproxy.example.com). Unfortunately, the automatic redirect from http to https does not work (http://shinyproxy.example.com -> https://shinyproxy.example.com).
I tried the following, but it did not work:
server: forward-headers-strategy: "native"
Any idea why this does not work and how I could fix this?
Thank you so much in advance!
Here is my application.yml:
This is the traefik.yml:
This is the applcation.yml for the shinyproxy: