Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ayon_api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,9 @@ def _try_connect_to_server(
try:
# TODO add validation if the url lead to AYON server
# - this won't validate if the url lead to 'google.com'
requests.get(url, timeout=timeout)
requests.get(
url, timeout=timeout, verify=os.getenv("AYON_CERT_FILE")
)
Comment on lines +332 to +334
Copy link
Member

@iLLiCiTiT iLLiCiTiT May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The verify argument is used to "check for ssl certificates" (and you can specify file with custom CA authority), using "standard CA authorities" when set to True, and cert is used to define custom path validated against CA authority.

Suggested change
requests.get(
url, timeout=timeout, verify=os.getenv("AYON_CERT_FILE")
)
ssl_verify = os.environ.get("AYON_CA_FILE") or True
cert = os.environ.get("AYON_CERT_FILE") or None
requests.get(
url, timeout=timeout, verify=ssl_verify, cert=cert
)


except BaseException:
return False
Expand Down