Add cert generation based off of hostname
This commit is contained in:
parent
c07aba0d10
commit
6fee957569
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ import json
|
|||
import os
|
||||
from threading import RLock
|
||||
import time
|
||||
from socket import gethostname
|
||||
|
||||
from .cert import generate_cert
|
||||
from ..nxbt import Nxbt, PRO_CONTROLLER
|
||||
|
|
@ -144,7 +145,7 @@ def start_web_app(ip='0.0.0.0', port=8000, usessl=False, cert_path=None):
|
|||
"\n"
|
||||
)
|
||||
print("Generating certificates...")
|
||||
cert, key = generate_cert('localhost')
|
||||
cert, key = generate_cert(gethostname())
|
||||
with open(cert_path, "wb") as f:
|
||||
f.write(cert)
|
||||
with open(key_path, "wb") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue