From e4cb8cce5feff47703b9e11a0c9208edb03e8d12 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 4 Dec 2024 16:55:56 +0100 Subject: [PATCH] Allow custom schemes for location settings --- scripts/Common/Software/docker/services/service.fish | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/Common/Software/docker/services/service.fish b/scripts/Common/Software/docker/services/service.fish index 78b71d2f..366dec1d 100644 --- a/scripts/Common/Software/docker/services/service.fish +++ b/scripts/Common/Software/docker/services/service.fish @@ -76,16 +76,23 @@ begin end function getServiceDefaultProxy -a domain service location - argparse -i "comment=" "path=" "url=" -- $argv + argparse -i "comment=" "path=" "scheme=" "url=" -- $argv + set -l scheme set -l url set -l config (getServiceOverrides $argv) set -l portKey (getServicePortKey "$service") set -l port (yq "$portKey" "$config" | extractPort) + if [ -n "$_flag_scheme" ] + set scheme "$_flag_scheme" + else + set scheme http + end + if [ -n "$_flag_url" ] set url "$_flag_url" else - set url "http://127.0.0.1:$port" + set url "$scheme://127.0.0.1:$port" if [ -n "$_flag_path" ] set url "$url$_flag_path"