@@ -94,6 +94,13 @@ export class Configuration implements IConfigurationSettings {
94
94
*/
95
95
private _serverUrl : string = 'https://collector.exceptionless.io' ;
96
96
97
+ /**
98
+ * The config server url that all configuration will be retrieved from.
99
+ * @type {string }
100
+ * @private
101
+ */
102
+ private _configServerUrl : string = 'https://config.exceptionless.io' ;
103
+
97
104
/**
98
105
* The heartbeat server url that all heartbeats will be sent to.
99
106
* @type {string }
@@ -115,6 +122,14 @@ export class Configuration implements IConfigurationSettings {
115
122
*/
116
123
private _dataExclusions : string [ ] = [ ] ;
117
124
125
+ private _includePrivateInformation : boolean ;
126
+ private _includeUserName : boolean ;
127
+ private _includeMachineName : boolean ;
128
+ private _includeIpAddress : boolean ;
129
+ private _includeCookies : boolean ;
130
+ private _includePostData : boolean ;
131
+ private _includeQueryString : boolean ;
132
+
118
133
/**
119
134
* A list of user agent patterns.
120
135
* @type {Array }
@@ -146,8 +161,10 @@ export class Configuration implements IConfigurationSettings {
146
161
this . log = inject ( configSettings . log ) || new NullLog ( ) ;
147
162
this . apiKey = configSettings . apiKey ;
148
163
this . serverUrl = configSettings . serverUrl ;
164
+ this . configServerUrl = configSettings . configServerUrl ;
149
165
this . heartbeatServerUrl = configSettings . heartbeatServerUrl ;
150
166
this . updateSettingsWhenIdleInterval = configSettings . updateSettingsWhenIdleInterval ;
167
+ this . includePrivateInformation = configSettings . includePrivateInformation ;
151
168
152
169
this . environmentInfoCollector = inject ( configSettings . environmentInfoCollector ) ;
153
170
this . errorParser = inject ( configSettings . errorParser ) ;
@@ -205,12 +222,33 @@ export class Configuration implements IConfigurationSettings {
205
222
public set serverUrl ( value : string ) {
206
223
if ( ! ! value ) {
207
224
this . _serverUrl = value ;
225
+ this . _configServerUrl = value ;
208
226
this . _heartbeatServerUrl = value ;
209
227
this . log . info ( `serverUrl: ${ value } ` ) ;
210
228
this . changed ( ) ;
211
229
}
212
230
}
213
231
232
+ /**
233
+ * The config server url that all configuration will be retrieved from.
234
+ * @returns {string }
235
+ */
236
+ public get configServerUrl ( ) : string {
237
+ return this . _configServerUrl ;
238
+ }
239
+
240
+ /**
241
+ * The config server url that all configuration will be retrieved from.
242
+ * @param value
243
+ */
244
+ public set configServerUrl ( value : string ) {
245
+ if ( ! ! value ) {
246
+ this . _configServerUrl = value ;
247
+ this . log . info ( `configServerUrl: ${ value } ` ) ;
248
+ this . changed ( ) ;
249
+ }
250
+ }
251
+
214
252
/**
215
253
* The heartbeat server url that all heartbeats will be sent to.
216
254
* @returns {string }
@@ -286,6 +324,138 @@ export class Configuration implements IConfigurationSettings {
286
324
this . _dataExclusions = Utils . addRange < string > ( this . _dataExclusions , ...exclusions ) ;
287
325
}
288
326
327
+ /**
328
+ * Gets a value indicating whether to include private information about the local machine.
329
+ * @returns {boolean }
330
+ */
331
+ public get includePrivateInformation ( ) : boolean {
332
+ return this . _includePrivateInformation ;
333
+ }
334
+
335
+ /**
336
+ * Sets a value indicating whether to include private information about the local machine
337
+ * @param value
338
+ */
339
+ public set includePrivateInformation ( value : boolean ) {
340
+ const val = value || false ;
341
+ this . _includePrivateInformation = val ;
342
+ this . includeUserName = val ;
343
+ this . _includeMachineName = val ;
344
+ this . includeIpAddress = val ;
345
+ this . includeCookies = val ;
346
+ this . includePostData = val ;
347
+ this . includeQueryString = val ;
348
+ this . changed ( ) ;
349
+ }
350
+
351
+ /**
352
+ * Gets a value indicating whether to include User Name.
353
+ * @returns {boolean }
354
+ */
355
+ public get includeUserName ( ) : boolean {
356
+ return this . _includeUserName ;
357
+ }
358
+
359
+ /**
360
+ * Sets a value indicating whether to include User Name.
361
+ * @param value
362
+ */
363
+ public set includeUserName ( value : boolean ) {
364
+ this . _includeUserName = value || false ;
365
+ this . changed ( ) ;
366
+ }
367
+
368
+ /**
369
+ * Gets a value indicating whether to include MachineName in MachineInfo.
370
+ * @returns {boolean }
371
+ */
372
+ public get includeMachineName ( ) : boolean {
373
+ return this . _includeMachineName ;
374
+ }
375
+
376
+ /**
377
+ * Sets a value indicating whether to include MachineName in MachineInfo.
378
+ * @param value
379
+ */
380
+ public set includeMachineName ( value : boolean ) {
381
+ this . _includeMachineName = value || false ;
382
+ this . changed ( ) ;
383
+ }
384
+
385
+ /**
386
+ * Gets a value indicating whether to include Ip Addresses in MachineInfo and RequestInfo.
387
+ * @returns {boolean }
388
+ */
389
+ public get includeIpAddress ( ) : boolean {
390
+ return this . _includeIpAddress ;
391
+ }
392
+
393
+ /**
394
+ * Sets a value indicating whether to include Ip Addresses in MachineInfo and RequestInfo.
395
+ * @param value
396
+ */
397
+ public set includeIpAddress ( value : boolean ) {
398
+ this . _includeIpAddress = value || false ;
399
+ this . changed ( ) ;
400
+ }
401
+
402
+ /**
403
+ * Gets a value indicating whether to include Cookies.
404
+ * NOTE: DataExclusions are applied to all Cookie keys when enabled.
405
+ * @returns {boolean }
406
+ */
407
+ public get includeCookies ( ) : boolean {
408
+ return this . _includeCookies ;
409
+ }
410
+
411
+ /**
412
+ * Sets a value indicating whether to include Cookies.
413
+ * NOTE: DataExclusions are applied to all Cookie keys when enabled.
414
+ * @param value
415
+ */
416
+ public set includeCookies ( value : boolean ) {
417
+ this . _includeCookies = value || false ;
418
+ this . changed ( ) ;
419
+ }
420
+
421
+ /**
422
+ * Gets a value indicating whether to include Form/POST Data.
423
+ * NOTE: DataExclusions are only applied to Form data keys when enabled.
424
+ * @returns {boolean }
425
+ */
426
+ public get includePostData ( ) : boolean {
427
+ return this . _includePostData ;
428
+ }
429
+
430
+ /**
431
+ * Sets a value indicating whether to include Form/POST Data.
432
+ * NOTE: DataExclusions are only applied to Form data keys when enabled.
433
+ * @param value
434
+ */
435
+ public set includePostData ( value : boolean ) {
436
+ this . _includePostData = value || false ;
437
+ this . changed ( ) ;
438
+ }
439
+
440
+ /**
441
+ * Gets a value indicating whether to include query string information.
442
+ * NOTE: DataExclusions are applied to all Query String keys when enabled.
443
+ * @returns {boolean }
444
+ */
445
+ public get includeQueryString ( ) : boolean {
446
+ return this . _includeQueryString ;
447
+ }
448
+
449
+ /**
450
+ * Sets a value indicating whether to include query string information.
451
+ * NOTE: DataExclusions are applied to all Query String keys when enabled.
452
+ * @param value
453
+ */
454
+ public set includeQueryString ( value : boolean ) {
455
+ this . _includeQueryString = value || false ;
456
+ this . changed ( ) ;
457
+ }
458
+
289
459
/**
290
460
* A list of user agent patterns that will cause any event with a matching user agent to not be submitted.
291
461
*
@@ -333,7 +503,7 @@ export class Configuration implements IConfigurationSettings {
333
503
*/
334
504
public addPlugin ( name : string , priority : number , pluginAction : ( context : EventPluginContext , next ?: ( ) => void ) => void ) : void ;
335
505
public addPlugin ( pluginOrName : IEventPlugin | string , priority ?: number , pluginAction ?: ( context : EventPluginContext , next ?: ( ) => void ) => void ) : void {
336
- const plugin : IEventPlugin = ! ! pluginAction ? { name : pluginOrName as string , priority, run : pluginAction } : pluginOrName as IEventPlugin ;
506
+ const plugin : IEventPlugin = ! ! pluginAction ? { name : pluginOrName as string , priority, run : pluginAction } : pluginOrName as IEventPlugin ;
337
507
if ( ! plugin || ! plugin . run ) {
338
508
this . log . error ( 'Add plugin failed: Run method not defined' ) ;
339
509
return ;
@@ -468,7 +638,7 @@ export class Configuration implements IConfigurationSettings {
468
638
*/
469
639
public static get defaults ( ) {
470
640
if ( Configuration . _defaultSettings === null ) {
471
- Configuration . _defaultSettings = { } ;
641
+ Configuration . _defaultSettings = { includePrivateInformation : true } ;
472
642
}
473
643
474
644
return Configuration . _defaultSettings ;
0 commit comments