Skip to content

Commit

Permalink
addressing more feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
blaise-muhirwa committed Oct 19, 2023
1 parent bd50fb0 commit 5138aa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/groundlight/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(
:param disable_tls_verification: Set this to `True` to skip verifying SSL/TLS certificates
when calling API from https server. If unset, the fallback will check
the environment variable "TLS_VERIFY" for `1` or `0`. By default,
the environment variable "DISABLE_TLS_VERIFY" for `1` or `0`. By default,
certificates are verified.
Disable verification if using a self-signed TLS certificate with a Groundlight
Expand Down Expand Up @@ -112,9 +112,10 @@ def __init__(
),
) from e

should_disable_tls_verification = disable_tls_verification or bool(
int(os.environ.get(DISABLE_TLS_VARIABLE_NAME, 0))
)
should_disable_tls_verification = disable_tls_verification

if should_disable_tls_verification is None:
should_disable_tls_verification = bool(int(os.environ.get(DISABLE_TLS_VARIABLE_NAME, 0)))

if should_disable_tls_verification:
logger.warning(
Expand Down
2 changes: 1 addition & 1 deletion src/groundlight/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
API_TOKEN_VARIABLE_NAME = "GROUNDLIGHT_API_TOKEN"

DEFAULT_ENDPOINT = "https://api.groundlight.ai/"
DISABLE_TLS_VARIABLE_NAME = "TLS_VERIFY"
DISABLE_TLS_VARIABLE_NAME = "DISABLE_TLS_VERIFY"


__all__ = ["API_TOKEN_WEB_URL", "API_TOKEN_VARIABLE_NAME", "DEFAULT_ENDPOINT", "DISABLE_TLS_VARIABLE_NAME"]

0 comments on commit 5138aa7

Please sign in to comment.