From 118541b4913f94994de65d25c0f34e82a4c6c1e8 Mon Sep 17 00:00:00 2001 From: Leonard Mocanu Date: Fri, 16 Dec 2022 23:25:46 +0200 Subject: [PATCH] docker: adds support for ipfs auth urls --- docker/start | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/start b/docker/start index d7729a252de..bbeabd166a3 100755 --- a/docker/start +++ b/docker/start @@ -32,12 +32,12 @@ save_coredumps() { wait_for_ipfs() { # Take the IPFS URL in $1 apart and extract host and port. If no explicit - # host is given, use 443 for https, and 80 otherwise - if [[ "$1" =~ ^((https?)://)?([^:/]+)(:([0-9]+))? ]] + # port is given, use 443 for https, and 80 otherwise + if [[ "$1" =~ ^((https?)://)?((.*)@)?([^:/]+)(:([0-9]+))? ]] then proto=${BASH_REMATCH[2]:-http} - host=${BASH_REMATCH[3]} - port=${BASH_REMATCH[5]} + host=${BASH_REMATCH[5]} + port=${BASH_REMATCH[7]} if [ -z "$port" ] then [ "$proto" = "https" ] && port=443 || port=80