From 5e57042e9c15f67640c4595fe88730b299ef5264 Mon Sep 17 00:00:00 2001 From: x12sa Date: Sat, 28 Mar 2026 10:35:31 +0100 Subject: [PATCH] https without certificate possible --- .../plugins/flomni/flomni_webpage_generator.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_webpage_generator.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_webpage_generator.py index dabcfe2..b5e789d 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_webpage_generator.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni_webpage_generator.py @@ -294,6 +294,8 @@ class HttpUploader: def _upload_files(self, files: list, force: bool = False) -> None: try: import requests as _requests + import urllib3 + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) except ImportError: logger.warning("HttpUploader: 'requests' library not installed") return @@ -327,13 +329,16 @@ class HttpUploader: def _do_cleanup(self) -> None: try: import requests as _requests + import urllib3 + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) except ImportError: return try: r = _requests.post( - self._url, - data={"action": "cleanup"}, - timeout=self._timeout, + self._url, + data={"action": "cleanup"}, + timeout=self._timeout, + verify=False, ) logger.info(f"HttpUploader cleanup: {r.text[:120]}") # Forget mtime records for ptycho files so they get re-uploaded