From a2fee7ed58c949632cfe3e3281f15fe67d408850 Mon Sep 17 00:00:00 2001 From: masacc Date: Fri, 1 Jun 2018 22:24:22 +0200 Subject: [PATCH] [FIX] nested `url` option replacement when $API_URLS contains `url: .*,` pattern (#4601) --- docker-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-run.sh b/docker-run.sh index 580e4289..3b0fa43d 100644 --- a/docker-run.sh +++ b/docker-run.sh @@ -55,7 +55,7 @@ fi # replace `url` with `urls` option if API_URLS is set if [[ -n "$API_URLS" ]]; then - sed -i "s|url: .*,|urls: $API_URLS,|g" $INDEX_FILE + sed -i "s|^\(\s*\)url: .*,|\1urls: $API_URLS,|g" $INDEX_FILE fi # replace the PORT that nginx listens on if PORT is supplied