In Educloud, non-HTTP(s) traffic is not being routed out to external IPv4 hosts, so our previous connectivity test using a TCP socket would fail there despite the API being usable.
I've rewritten the check to perform a GET for the domain root using requests, with anything other than 403 being accepted as success, as we don't currently offer any kind of info or health endpoint that could be used here.
The PR also adds an environment variable for just disabling all checks outright. If TACL_DISABLE_API_CONNECTION_CHECK is set, no checks will be run.
In Educloud, non-HTTP(s) traffic is not being routed out to external IPv4 hosts, so our previous connectivity test using a TCP socket would fail there despite the API being usable.
I've rewritten the check to perform a GET for the domain root using requests, with anything other than 403 being accepted as success, as we don't currently offer any kind of info or health endpoint that could be used here.
The PR also adds an environment variable for just disabling all checks outright. If TACL_DISABLE_API_CONNECTION_CHECK is set, no checks will be run.