Commit f6c2515d authored by Vitaly Lipatov's avatar Vitaly Lipatov

eget: use only selected ipfs gateway when EGET_IPFS_GATEWAY is set

parent 8eba153d
......@@ -630,6 +630,15 @@ check_ipfs_gateway()
select_ipfs_gateway()
{
IPFS_GATEWAY=''
# if set some http gateway, use only it
if [ -n "$EGET_IPFS_GATEWAY" ] ; then
check_ipfs_gateway "$EGET_IPFS_GATEWAY" && IPFS_GATEWAY="$EGET_IPFS_GATEWAY" || ipfs_mode="disabled"
return
fi
# check public http gateways
for ipfs_gateway in $ipfs_gateways ; do
check_ipfs_gateway $ipfs_gateway || continue
......@@ -672,14 +681,6 @@ select_ipfs_mode()
fi
fi
IPFS_GATEWAY=''
# if set some http gateway, use only it
if [ -n "$EGET_IPFS_GATEWAY" ] ; then
check_ipfs_gateway "$EGET_IPFS_GATEWAY" && IPFS_GATEWAY="$EGET_IPFS_GATEWAY" || ipfs_mode="disabled"
return
fi
select_ipfs_gateway
}
......
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