serilog-sinks-browserhttp
serilog-sinks-browserhttp copied to clipboard
Request authentication and/or filtering
By default, the /ingest
endpoint will accept any payload it receives. We could implement a request validation callback to filter out unauthenticated or otherwise unacceptable requests, e.g.:
app.UseSerilogIngestion(options => {
// Just deny everything :-)
options.OnIngestingAsync = async httpContext => httpContext.Response.StatusCode = 401;
});