Answer the question
In order to leave comments, you need to log in
How to set up https on a Python server accessed by IP?
There is a Python server that is started by the following code:
//PageHandler3.PageHandlerClass3 содержит логику бекенда
def run(server_class=ThreadingHTTPServer, handler_class=PageHandler3.PageHandlerClass3):
server_address = ('', PORT)
httpd = server_class(server_address, handler_class)
print("Serving at", PORT)
httpd.serve_forever()
run()
httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile='data//keys//new//cert.pem', keyfile='data//keys//new//privkey.pem', ssl_version=ssl.PROTOCOL_SSLv23)
Answer the question
In order to leave comments, you need to log in
does
not issue a license for IP, they only promise
others, but if you don’t want to spend money on a domain ... a certificate is much more expensive than two dollars,
buy a domain - they cost 0.99 in bulk,
and you can still write everything yourself, but it’s unlikely to work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question