Verified Commit 03d74844 authored by Todd Weaver's avatar Todd Weaver
Browse files

Using the stripped right '/' from instance when checking if api is valid

to remove the https://<instance>//api doubling of trailing '/' on domain
parent db70e761
......@@ -60,16 +60,18 @@ class Instances:
# remove non http gettable urls
if (not instance_uri.endswith('.onion') and
not instance_uri.endswith('.i2p')):
# add a backup
# check the instance can run a query on the API
def check_query_api_valid(self, uri):
# /api/v1/search?q=query
# /api/v1/search?q=Librem%205;fields=type
search_uri = f"{uri}/api/v1/search?q=Librem%205;fields=type"
session =
session.set_property("timeout", 2)
message ="GET", search_uri)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment