mirror of
https://github.com/zebrajr/ansible.git
synced 2025-12-06 12:19:53 +01:00
15 lines
422 B
Python
15 lines
422 B
Python
from __future__ import annotations
|
|
|
|
import http.server
|
|
import socketserver
|
|
import ssl
|
|
|
|
if __name__ == '__main__':
|
|
Handler = http.server.SimpleHTTPRequestHandler
|
|
context = ssl.SSLContext()
|
|
context.load_cert_chain(certfile='./cert.pem', keyfile='./key.pem')
|
|
httpd = socketserver.TCPServer(("", 4443), Handler)
|
|
httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
|
|
|
|
httpd.serve_forever()
|