Allow custom schemes for location settings
This commit is contained in:
parent
9dc93b1b8e
commit
1c93d4b3f4
1 changed files with 9 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue