Created
January 31, 2019 04:19
-
-
Save unnamalai-kb/6e87b9a1f9557cc24b2842fcf707e7cc to your computer and use it in GitHub Desktop.
Python 3 Simple HTTPS Server
This file contains hidden or 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
# python ../httpsserver.py | |
# in your browser, visit: | |
# https://localhost:4443 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
import ssl | |
httpd = HTTPServer(("localhost", 4443), SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket (httpd.socket, certfile="../httpsserver.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