Documentation Index
Fetch the complete documentation index at: https://wsignal.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Request Matching
wsignal matches requests by pathname first and then by allowed method.
Unmatched Path
If no endpoint matches the request path:- Status:
404 - Body:
No webhook endpoint matched this request.
Method Mismatch
If the path exists but the method is not allowed:- Status:
405 Allowheader is set to the configured methods- Body:
Method not allowed.
Persistence Before Response
For static response and forwarding endpoints,wsignal writes the event to disk before it acknowledges the request.
That means:
- A successful response implies the event was persisted successfully.
- A write failure produces a
500response withFailed to persist webhook event.
Forwarding
Endpoint forwarding is asynchronous and happens after:- Local persistence succeeds
- The local response is sent
- The configured
forward.method, or the original request method when omitted - The original request body when the method allows a body
- The original headers, except
hostandcontent-length - Any
forward.headers, which override existing header keys
when rules receive every event. Targets with when.headers or when.query only receive events where every configured condition matches.
Proxying
Endpoint proxying is synchronous. It is intended for flows where the caller needs the upstream response, such as local login testing. Proxying uses:- The configured
proxy.method, or the original request method when omitted - The original request body when the method allows a body
- The original headers, except
hostandcontent-length - Any
proxy.headers, which override existing header keys - The original query string, appended to
proxy.url
wsignal returns the upstream status, headers, and body to the original caller. Redirect responses are not automatically followed, so upstream Location and Set-Cookie headers can be returned.
If the upstream request fails, wsignal returns 502 with Proxy request failed.
Log Rotation
Rotation is size-based. Before appending a new event,wsignal checks the current target log file size. When the file is at or above the configured size threshold, it:
- Renames the active file to a timestamped rotated file
- Creates a new active file on the next append
- Prunes the oldest rotated files if they exceed
maxFiles
logs, inspect, and replay.
Record Loading
When a config file is present,wsignal discovers:
- The central log file
- Each endpoint-specific log file
- Rotated variants of each base log file
logs, inspect, and replay fall back to .wsignal in the current working directory.