Class BowireInterceptorOptions
- Namespace
- Kuestenlogik.Bowire.Interceptor
- Assembly
- Kuestenlogik.Bowire.Interceptor.dll
Per-host configuration for Kuestenlogik.Bowire.Interceptor.BowireInterceptorMiddleware.
The host hands an instance to UseBowireInterceptor(); the
middleware honours it for every request that passes through.
public sealed class BowireInterceptorOptions
- Inheritance
-
BowireInterceptorOptions
- Inherited Members
Remarks
All options have sensible defaults that match the acceptance criteria on the issue (#153): 1 MB body cap, in-process recording disabled until Phase B's auto-record hook lands, the Bowire workbench's own API endpoints excluded so the rail never observes itself.
Constructors
BowireInterceptorOptions()
public BowireInterceptorOptions()
Properties
Enabled
Master kill-switch — when false the middleware short-circuits immediately with no body buffering, no stream wrapping, no store write. Useful for ops-driven feature flagging without re-deploying.
public bool Enabled { get; set; }
Property Value
IgnoredPathPrefixes
Path prefixes the middleware does not observe. Default is the
workbench's own surface (/bowire) plus its API endpoints so
turning the interceptor on does not flood the rail with self-traffic.
Operators can extend the list (e.g. to mute a noisy health-check
route) by mutating it before passing the options to
UseBowireInterceptor.
public List<string> IgnoredPathPrefixes { get; }
Property Value
Remarks
Matched case-insensitively against the request path. A prefix
match is sufficient: /bowire covers /bowire/api/foo.
MaxBodyBytes
Maximum number of bytes of request / response body the middleware will capture per side. Bodies larger than this are recorded up to the cap with RequestBodyTruncated / ResponseBodyTruncated set. Default 1 MiB.
public int MaxBodyBytes { get; set; }
Property Value
MaxRetainedFlows
Maximum number of intercepted flows the in-memory ring buffer retains. Older flows are evicted FIFO. Default 1000 — same as the proxy capture store.
public int MaxRetainedFlows { get; set; }
Property Value
MocksEnabled
Phase D — when true, the middleware consults InterceptorMockStore for a matching rule BEFORE forwarding the request. A matching rule short-circuits the pipeline: the host's endpoint never runs, the rule's response goes straight to the client, and the captured flow is still recorded into InterceptedFlowStore (with the Mocked flag set).
public bool MocksEnabled { get; set; }
Property Value
Remarks
Defaults to true — when the rule set is empty (the default) the check is free (one ref-equality null compare) and the operator opts in by adding a rule. Hosts that explicitly want to forbid mock injection (e.g. a production host that loaded Bowire only for read-only observability) can flip this to false.