File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { AzureAppConfigurationOptions } from "./AzureAppConfigurationOptions.js"
88import { ConfigurationClientManager } from "./ConfigurationClientManager.js" ;
99import { EtagUrlPipelinePolicy } from "./EtagUrlPipelinePolicy.js" ;
1010import { instanceOfTokenCredential } from "./common/utils.js" ;
11+ import { ArgumentError } from "./common/error.js" ;
1112
1213const MIN_DELAY_FOR_UNHANDLED_ERROR : number = 5_000 ; // 5 seconds
1314
@@ -75,7 +76,11 @@ export async function loadFromCdn(
7576 appConfigOptions ?: AzureAppConfigurationOptions
7677) : Promise < AzureAppConfiguration > {
7778 if ( appConfigOptions === undefined ) {
78- appConfigOptions = { clientOptions : { } } ;
79+ appConfigOptions = {
80+ replicaDiscoveryEnabled : false // Disable replica discovery for CDN
81+ } ;
82+ } else if ( appConfigOptions . replicaDiscoveryEnabled ) {
83+ throw new ArgumentError ( "Replica discovery is not supported when loading from CDN." ) ;
7984 }
8085
8186 appConfigOptions . clientOptions = {
You can’t perform that action at this time.
0 commit comments