File tree 1 file changed +6
-4
lines changed
packages/config-resolver/src
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,20 @@ export interface EndpointsResolvedConfig
43
43
export function resolveEndpointsConfig < T > (
44
44
input : T & EndpointsInputConfig & PreviouslyResolved
45
45
) : T & EndpointsResolvedConfig {
46
- const tls = input . tls || true ;
46
+ const tls = input . tls === undefined ? true : input . tls ;
47
47
const endpoint : Provider < Endpoint > = input . endpoint
48
48
? normalizeEndpoint ( input . endpoint , input . urlParser )
49
49
: ( ) =>
50
50
input . region ( ) . then ( async region => {
51
51
const hostname = (
52
52
( await input . regionInfoProvider ( region ) ) || ( { } as RegionInfo )
53
53
) . hostname ;
54
- if ( ! hostname )
54
+ if ( ! hostname ) {
55
55
throw new Error ( "Cannot resolve hostname from client config" ) ;
56
- const endpoint = input . urlParser ( hostname ) ;
57
- endpoint . protocol = tls ? "https:" : "http:" ;
56
+ }
57
+ const endpoint = input . urlParser (
58
+ `${ tls ? "https:" : "http:" } //${ hostname } `
59
+ ) ;
58
60
return endpoint ;
59
61
} ) ;
60
62
return {
You can’t perform that action at this time.
0 commit comments