mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
beta4
This commit is contained in:
@@ -66,7 +66,11 @@ const addressHostToUrl = (
|
||||
{ options, username, suffix }: Address,
|
||||
host: HostName,
|
||||
): UrlString => {
|
||||
const scheme = host.endsWith('.onion') ? options.scheme : (options.addSsl ? options.addSsl.scheme : options.scheme) // TODO: encode whether hostname transport is "secure"?
|
||||
const scheme = host.endsWith(".onion")
|
||||
? options.scheme
|
||||
: options.addSsl
|
||||
? options.addSsl.scheme
|
||||
: options.scheme // TODO: encode whether hostname transport is "secure"?
|
||||
return `${scheme ? `${scheme}//` : ""}${
|
||||
username ? `${username}@` : ""
|
||||
}${host}${suffix}`
|
||||
|
||||
Reference in New Issue
Block a user