1
0
Форкнуть 0

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:
Cijo Thomas 2019-07-08 16:59:37 -07:00 коммит произвёл GitHub
Родитель 8753a25e35
Коммит 6ac40d4b18
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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>