proxy – How can I forward HTTPS traffic with UWSGI?

I have a UWSGI application running on localhost:5011 made in Python, which is intended to be used as a proxy server.
The proxy server’s purpose is to rotate a list of IPs until the target website successfully allows access.

The way I intend to use my proxy server is as following:

proxies = {
    'http': 'http://localhost:5011',
    'https': 'http://localhost:5011'

response =

Since the request URI is HTTPS, UWSGI receives a HTTP_METHOD: CONNECT which is unable to read, for instance, the REQUEST_URI and therefore unable to forward the request.

How can I start by being able to read the URI and forward the request with UWSGI?