I am hosting a Dash for R web app on a Heroku Hobby Dyno using a custom domain with automatic SSL/TLS enabled (i.e., when you explicitly navigate to https://examplewebsite.org, the connection is secure.
However, I would like to redirect from http://examplewebsite.org to HTTPS (i.e., force the site to use SSL/TLS). I have read the Heroku documentation which:
-
Indicates that redirects must be performed at the application level - I must code the redirect logic into my Dash app.
-
Recommends the use of GoogleCloudPlatform/flask-talisman for Flask apps in Python. However, I am using Dash for R, regarding which the documentation provides no recommendations. Even if I had the R-equivalent of Talisman installed, I am not sure how to explicitly access the Flask app object in Dash for R to attempt to apply it.
I have not been able to find a solution to this issue and kindly request your assistance. Thank you.