如何讓Tornado網(wǎng)站同時(shí)支持http和https兩種協(xié)議訪問(wèn)
1 回答

慕村9548890
TA貢獻(xiàn)1884條經(jīng)驗(yàn) 獲得超4個(gè)贊
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. (In Python 3.2+ you can pass an ssl.SSLContext object instead of a dict):
HTTPServer(applicaton, ssl_options={
"certfile": os.path.join(data_dir, "mydomain.crt"),
"keyfile": os.path.join(data_dir, "mydomain.key"),
})
- 1 回答
- 0 關(guān)注
- 816 瀏覽
添加回答
舉報(bào)
0/150
提交
取消