Open 77598072 opened 4 years ago
I have the same issue, is there a way to pass verify=False?
Hi @zoobab @77598072!
Thanks for posting the issue. I've set https upstream in several projects without any issue. Are you using same server? If proxy resolves in an internal url you should use http instead of https.
I have made the following patch to achieve the same verify=False functionality, but I am sure there is a way to add this feature in a more cleaner way, doing it with sed in a Dockerfile:
# patch for SSL verify false, see https://github.com/jazzband/django-revproxy/issues/116 and https://stackoverflow.com/questions/36600583/python-3-urllib-ignore-ssl-certificate-verification
USER root
RUN sed -i "s/HTTP_POOLS\ =\ urllib3.PoolManager()/HTTP_POOLS\ =\ urllib3.PoolManager(cert_reqs='CERT_NONE')/g" /opt/conda/envs/myproxy/lib/python3.1/site-packages/revproxy/views.py
RUN sed -i "s/import\ urllib3/import\ urllib3\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)/g" /opt/conda/envs/myproxy/lib/python3.1/site-packages/revproxy/views.py
For me it works(tm), but I would welcome an option to ignore SSL verifications, as curl
has it with the -k
option.
@zoobab what urllib3
version are you using?
@andruten urllib3==2.2.1
@zoobab Could you try with a 1.26.x version?
I requested https service, he reported an error.
I read the source code and made the following changes, it work, but I want to know, is there an official way to complete the https request?