It's a bit outside of its original scope but with more and more application requiring HTTPS it is sometime needed even when doing some simple tests or local development.
It's quite easy to have an SSL certificate, either auto-signed or using Let's Encrypt but configuring Nginx or HAProxy just to serve a local directory on localhost is tedious.
I think just wrapping the socket in SSLSocket and adding two flags on the command line would be enough?
Activity
remilapeyre commented on Jun 16, 2020
It's a bit outside of its original scope but with more and more application requiring HTTPS it is sometime needed even when doing some simple tests or local development.
It's quite easy to have an SSL certificate, either auto-signed or using Let's Encrypt but configuring Nginx or HAProxy just to serve a local directory on localhost is tedious.
I think just wrapping the socket in SSLSocket and adding two flags on the command line would be enough?
Fred commented on May 20, 2021
It could look for a existing certificate in a well-known location, and could fallback to an self-signed certificate that could be shipped with Python.
Fred commented on Oct 27, 2021
How is this going? Any progress?
kaisxu commented on Sep 26, 2023
Just check, how is the progress?
gh-85162: Add `HTTPSServer` to `http.server` to serve files over HTTPS (