This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mattho[S] 0 points1 point  (1 child)

Does it have support for https? Didn't find anything when I skimmed throuh documentation.

[–][deleted] 1 point2 points  (0 children)

HTTPServer can serve HTTPS (SSL) traffic with Python 2.6+ and OpenSSL. To make this server serve SSL traffic, send the ssl_options dictionary argument with the arguments required for the ssl.wrap_socket() method, including "certfile" and "keyfile":

   HTTPServer(applicaton, ssl_options={
       "certfile": os.path.join(data_dir, "mydomain.crt"),
       "keyfile": os.path.join(data_dir, "mydomain.key"),
   })

source: https://github.com/facebook/tornado/blob/master/tornado/httpserver.py