@@ -120,7 +120,6 @@ export class EppoJSClient extends EppoClient {
120
120
*/
121
121
public static instance = new EppoJSClient ( {
122
122
flagConfigurationStore,
123
- isObfuscated : true ,
124
123
} ) ;
125
124
126
125
public static initialized = false ;
@@ -313,8 +312,6 @@ export class EppoJSClient extends EppoClient {
313
312
if ( config . banditLogger ) {
314
313
this . setBanditLogger ( config . banditLogger ) ;
315
314
}
316
- // Default to obfuscated mode when requesting configuration from the server.
317
- this . setIsObfuscated ( true ) ;
318
315
319
316
const storageKeySuffix = buildStorageKeySuffix ( apiKey ) ;
320
317
@@ -340,7 +337,6 @@ export class EppoJSClient extends EppoClient {
340
337
// We do this because we don't store any metadata in the persistent store and can make the assumption that entries
341
338
// in the persistent store are obfuscated since the reason behind obfuscation is to obfuscate any data stored on a
342
339
// user device.
343
- this . setIsObfuscated ( true ) ; // Use deprecated method to silence warning logs.
344
340
configurationStore . setFormat ( FormatEnum . CLIENT ) ;
345
341
this . setFlagConfigurationStore ( configurationStore ) ;
346
342
@@ -531,7 +527,13 @@ export class EppoJSClient extends EppoClient {
531
527
const memoryOnlyConfigurationStore = configurationStorageFactory ( {
532
528
forceMemoryOnly : true ,
533
529
} ) ;
530
+
531
+ // Allow the caller to override the default obfuscated mode, which is false
532
+ // since the purpose of this method is to bootstrap the SDK from an external source,
533
+ // which is likely a server that has not-obfuscated flag values.
534
+ // This is the equivalent of setIsObfuscated
534
535
memoryOnlyConfigurationStore . setFormat ( isObfuscated ? FormatEnum . CLIENT : FormatEnum . SERVER ) ;
536
+
535
537
memoryOnlyConfigurationStore
536
538
. setEntries ( config . flagsConfiguration )
537
539
. catch ( ( err ) =>
@@ -555,11 +557,6 @@ export class EppoJSClient extends EppoClient {
555
557
this . unsetOverrideStore ( ) ;
556
558
}
557
559
558
- // Allow the caller to override the default obfuscated mode, which is false
559
- // since the purpose of this method is to bootstrap the SDK from an external source,
560
- // which is likely a server that has not-obfuscated flag values.
561
- this . setIsObfuscated ( isObfuscated ) ;
562
-
563
560
if ( config . assignmentLogger ) {
564
561
this . setAssignmentLogger ( config . assignmentLogger ) ;
565
562
}
@@ -686,7 +683,7 @@ export function getInstance(): EppoJSClient {
686
683
* @returns a URL string
687
684
* @public
688
685
*/
689
- export function getConfigUrl ( apiKey : string , baseUrl ?: string ) : URL {
686
+ export function getConfigUrl ( apiKey : string , baseUrl ?: string ) : string {
690
687
const queryParams = { sdkName, sdkVersion, apiKey } ;
691
688
return new ApiEndpoints ( { baseUrl, queryParams } ) . ufcEndpoint ( ) ;
692
689
}
0 commit comments