mirror of
https://github.com/bitwarden/server.git
synced 2024-11-28 13:15:12 +01:00
explicitly disable app insights telemetry
This commit is contained in:
parent
619a00637d
commit
819a4e031d
@ -2,6 +2,7 @@
|
|||||||
using Bit.Core;
|
using Bit.Core;
|
||||||
using Bit.Core.Identity;
|
using Bit.Core.Identity;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
|
using Microsoft.ApplicationInsights.Extensibility;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Routing;
|
using Microsoft.AspNetCore.Routing;
|
||||||
@ -72,15 +73,17 @@ namespace Bit.Admin
|
|||||||
IHostingEnvironment env,
|
IHostingEnvironment env,
|
||||||
IApplicationLifetime appLifetime,
|
IApplicationLifetime appLifetime,
|
||||||
GlobalSettings globalSettings,
|
GlobalSettings globalSettings,
|
||||||
ILoggerFactory loggerFactory)
|
ILoggerFactory loggerFactory,
|
||||||
|
TelemetryConfiguration telemetryConfiguration)
|
||||||
{
|
{
|
||||||
loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error);
|
|
||||||
|
|
||||||
if(globalSettings.SelfHosted)
|
if(globalSettings.SelfHosted)
|
||||||
{
|
{
|
||||||
app.UsePathBase("/admin");
|
app.UsePathBase("/admin");
|
||||||
|
telemetryConfiguration.DisableTelemetry = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loggerFactory.AddSerilog(app, env, appLifetime, globalSettings, (e) => e.Level >= LogEventLevel.Error);
|
||||||
|
|
||||||
if(env.IsDevelopment())
|
if(env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.ApplicationInsights.Extensibility;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -13,8 +14,10 @@ namespace Bit.Server
|
|||||||
public void Configure(
|
public void Configure(
|
||||||
IApplicationBuilder app,
|
IApplicationBuilder app,
|
||||||
ILoggerFactory loggerFactory,
|
ILoggerFactory loggerFactory,
|
||||||
IConfiguration configuration)
|
IConfiguration configuration,
|
||||||
|
TelemetryConfiguration telemetryConfiguration)
|
||||||
{
|
{
|
||||||
|
telemetryConfiguration.DisableTelemetry = true;
|
||||||
loggerFactory
|
loggerFactory
|
||||||
.AddConsole()
|
.AddConsole()
|
||||||
.AddDebug();
|
.AddDebug();
|
||||||
|
Loading…
Reference in New Issue
Block a user