I always use NGINX for this. Run Flask/Gunicorn on localhost:5000 and have NGINX rewrite https requests to localhost requests. In nginx.conf I automatically redirect every http request to https. Static files are served by NGINX, not by Gunicorn, which is faster. NGINX also allows you to easily set the transfer encoding to gzip Albert-Jan -- https://mail.python.org/mailman/listinfo/python-list
- Gunicorn - HTTP and HTTPS in the same instance? Skip Montanaro
- Re: Gunicorn - HTTP and HTTPS in the same instance? Kushal Kumaran
- Re: Gunicorn - HTTP and HTTPS in the same instance? Albert-Jan Roskam
- RE: Gunicorn - HTTP and HTTPS in the same instance? Kirill Ratkin
- Re: Gunicorn - HTTP and HTTPS in the same insta... Skip Montanaro
- Re: Gunicorn - HTTP and HTTPS in the same i... Lars Liedtke
- Re: Gunicorn - HTTP and HTTPS in the same i... Lars Liedtke