Member-only story
Python, add SSL to a Tornado App + redirect from HTTP to HTTPS
Feb 11, 2021

A quick way to install SSL certificates is to add the ssl_options to your HTTPServer, using the os.path.join with a relative folder location, and the file name (this works on both Windows and Linux, just keep in mind you need to use the os.path.join function).
The second step is to make sure your RequestHandler redirects to your using HTTPS protocol by doing a redirect on the prepare method as shown below.
The full code for the application is shown below:
Hope this helps!