Make JavaScriptEncoder optional and Fallback to JavaScriptEncoder.Default (#918)
* make JavascriptEncoder optional parameter to prevent crash when no encoder is available.
This commit is contained in:
Родитель
8753a25e35
Коммит
6ac40d4b18
|
@ -2,6 +2,9 @@
|
|||
|
||||
## Version 2.8.0-beta1
|
||||
- [Fix: Add `IJavaScriptSnippet` service interface and update the `IServiceCollection` extension to register it for `JavaScriptSnippet`.](https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/890)
|
||||
- [Make JavaScriptEncoder optional and Fallback to JavaScriptEncoder.Default.](https://github.com/microsoft/ApplicationInsights-aspnetcore/pull/918)
|
||||
|
||||
## Version 2.7.1
|
||||
- [Fix - ApplicationInsights StartupFilter should not swallow exceptions from downstream ApplicationBuilder.](https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/897)
|
||||
|
||||
## Version 2.7.0
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
TelemetryConfiguration telemetryConfiguration,
|
||||
IOptions<ApplicationInsightsServiceOptions> serviceOptions,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
JavaScriptEncoder encoder)
|
||||
JavaScriptEncoder encoder = null)
|
||||
{
|
||||
this.telemetryConfiguration = telemetryConfiguration;
|
||||
this.httpContextAccessor = httpContextAccessor;
|
||||
this.enableAuthSnippet = serviceOptions.Value.EnableAuthenticationTrackingJavaScript;
|
||||
this.encoder = encoder;
|
||||
this.encoder = (encoder == null) ? JavaScriptEncoder.Default : encoder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Загрузка…
Ссылка в новой задаче