Created
May 21, 2015 19:09
-
-
Save 0xBADCA7/41f3ece467204b799b79 to your computer and use it in GitHub Desktop.
Simple HTTPS server in Python 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from http.server import HTTPServer,SimpleHTTPRequestHandler | |
from socketserver import BaseServer | |
import ssl | |
httpd = HTTPServer(('localhost', 1443), SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='certificate.pem', keyfile='privatekey.pem', server_side=True) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment