I have developed an web application that consists of a shiny app (has a login feature connected to an RMySQL database), a website and a mariadb database. I put them together in a docker-compose file and tested it on my local computer and it works fine. I then proceeded to deploy them in a Kubernetes cluster in GCE and that was also successful. I used cloudflare to install a ssl certificate for the shiny app domain (i.e. trnddaapp.com). Now when I load the shiny app domain in the browser it appends the https and loads the app successfully but after about a minute it crashes (greys out). I loaded the shiny app external ip with http and this doesn’t crash. When I load my docker shiny app domain name in the browser, it crashes (greys out) and I get this "ERROR: [_parse_http_data] invalid HTTP method".
The closest solution I have come to is https://github.com/rstudio/shiny-server/issues/392 but there doesn't seem to be any other solution to my problem. I would be grateful if anyone help me resolve this problem.
My app works fine if I run it from a server without using https, like http://mydomain:3939, but stops immediately after startup if I reach the exact same app from the same server through: https://mydomain.com (it shows the UI interface, but almost immediately it grays out).
Update, with additional hints:
when I included the chatty version of httpuv - devtools::install_github('rstudio/httpuv@wch-print-req') - suggested in the github issue mentioned above - https://github.com/rstudio/shiny-server/issues/392 - I did not get any meaningful error message. But when I run the app without https, the following call that appeared in the log relates to DT (datatable)... perhaps something there?
if I run the same app from a Docker instance of Shiny Server, instead of as the last command of a Docker image, then there's no problem with https and the app works just fine