homeylab / bookstack-file-exporter

This tool provides a way to export bookstack pages in a folder-tree layout into object storage or locally.
MIT License
15 stars 4 forks source link

Suppress warnings for unsafe cert #45

Open vmario89 opened 2 weeks ago

vmario89 commented 2 weeks ago

Hi, when using untrusted cert, we get a lot of warnings

/opt/bookstack-venv/lib/python3.12/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'docs.redacted.org'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings

i added some suppression to make the output of the log readable.

vim /opt/bookstack-venv/lib/python3.12/site-packages/bookstack_file_exporter/common/util.py

from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)

when we configure to be insecure means we know the risk. so it makes sense to me to suppress them by code

what do you think?

pchang388 commented 1 week ago

I think this is something that can be incorporated. I will take a look and get to you on this