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;
});
By default, the
/ingestendpoint will accept any payload it receives. We could implement a request validation callback to filter out unauthenticated or otherwise unacceptable requests, e.g.: