Open Closed

How to disable the response from discovery endpoints? #8833


User avatar
0
nhontran created
  • ABP Framework version: v8.0.2

  • UI Type: Angular

  • Database System: EF Core

  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hi, After migrated to OpenIdDict, the response from discovery endpoints are logged into the log file which consuming a lot of disk space, is there a configuration to turn it off?

image.png


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    <PackageReference Include="Serilog.Expressions" Version="3.4.0" />
    

    add .Filter.ByExcluding("RequestPath = '/.well-known/openid-configuration'")

    Log.Logger = new LoggerConfiguration()
        .MinimumLevel.Information()
        .Filter.ByExcluding("RequestPath = '/.well-known/openid-configuration'")
        .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
        .Enrich.FromLogContext()
        .WriteTo.Async(c => c.File("Logs/logs.txt"))
        .WriteTo.Async(c => c.Console())
        .CreateLogger();
    
  • User Avatar
    0
    nhontran created

    Thank @maliming

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 19, 2025, 10:09