Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

Unnecessary logging with .NET Core error handling #124

Open dawidgrybowicz9 opened 5 months ago

dawidgrybowicz9 commented 5 months ago

Hi,

I'm using Geta.NotFoundHandler along with .NET Core error handling. Issue is that NotFoundHandler is saving a lot of urls meant for either ExceptionHandler or StatusCodePagesWithReExecute (e.g. StatusCodePage/404) for example if 404 is thrown in CMS. I tried few different varations for setup in Startup.cs, but couldn't find correct configuration as either redirects or error handling didn't work correctly. Is there even any correct configuration with error handling? Possibly there is an option to ignore specific url?

For reference my configuration is in that order: app.UseExceptionHandler("/StatusCodePage/{0}"); app.UseStatusCodePagesWithReExecute("/StatusCodePage/{0}"); app.UseNotFoundHandler(); app.UseOptimizelyNotFoundHandler();

Hopefully @marisks you're best person to help

Thank you