Merge pull request #528 from r0fls/523

allow running with SSL via commandline
This commit is contained in:
Raphael Deem
2017-03-10 00:35:46 -08:00
committed by GitHub
4 changed files with 32 additions and 6 deletions

View File

@@ -9,4 +9,12 @@ Optionally pass in an SSLContext:
context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain("/path/to/cert", keyfile="/path/to/keyfile")
app.run(host="0.0.0.0", port=8443, ssl=context)
app.run(host="0.0.0.0", port=8443, ssl=context)
You can also pass in the locations of a certificate and key as a dictionary:
.. code:: python
ssl = {'cert': "/path/to/cert", 'key': "/path/to/keyfile"}
app.run(host="0.0.0.0", port=8443, ssl=ssl)