Skip to content

Commit ecff0e0

Browse files
committed
Parametrize ssl files
1 parent 719b224 commit ecff0e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tutorials/a-simple-walkthrough/astre.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def run():
4646
"server.socket_host": "0.0.0.0",
4747
"server.socket_port": 8444,
4848
"server.ssl_module": "builtin",
49-
"server.ssl_private_key": os.path.join(cur_dir, "key.pem"),
50-
"server.ssl_certificate": os.path.join(cur_dir, "cert.pem")
49+
"server.ssl_private_key": os.path.join(cur_dir, os.environ.get("SSL_KEY", "key.pem")),
50+
"server.ssl_certificate": os.path.join(cur_dir, os.environ.get("SSL_CRT","cert.pem"))
5151
})
5252
PIDFile(cherrypy.engine, 'astre.pid').subscribe()
5353
cherrypy.quickstart(Root())

tutorials/a-simple-walkthrough/sunset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import requests
66

77
cur_dir = os.path.abspath(os.path.dirname(__file__))
8-
key_path = os.path.join(cur_dir, "key.pem")
9-
cert_path = os.path.join(cur_dir, "cert.pem")
8+
key_path = os.path.join(cur_dir, os.environ.get("SSL_KEY", "key.pem"))
9+
cert_path = os.path.join(cur_dir, os.environ.get("SSL_CRT", "cert.pem"))
1010

1111

1212
class Root:

0 commit comments

Comments
 (0)