Gunicorn - HTTP and HTTPS in the same instance?
Albert-Jan Roskam
sjeik_appie at hotmail.com
Sat Jan 8 08:00:06 EST 2022
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
More information about the Python-list
mailing list