def Proxy.parse.at

bend-kube-runtime@0.2.0.0 · src/proxy.bend:242

import bend-kube-runtime@0.2.0.0/src/proxy.bend as Proxy
import Base
import bend-kube-runtime@0.2.0.0/src/base64.bend as B
import bend-kube-runtime@0.2.0.0/src/config.bend as K

242# The authority's parts split at '@', last first: the host, then the
243# user info (which may itself hold an '@').
244def Proxy.parse.at(rs: List<&2, String>) -> Route:
245  match rs:
246    case Con{hp, Nil{}}:
247      Proxy.parse.hp(K.Url.host_port(hp, 80), "")
248    case Con{hp, us}:
249      Proxy.parse.hp(K.Url.host_port(hp, 80),
250        B.B64.encode(Pct.decode(String.join(List.reverse(&2, String, us), "@"))))
251    case Nil{}:
252      NoRoute{"HTTPS_PROXY names no host"}

Uses (9)

Used by (1)