Skip to content

Commit adc55e8

Browse files
committed
docs(readme): shorten the synchronization rule counts mention
1 parent 040c120 commit adc55e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ That's it. `setup` adds `@patchstack/connect` to the project when it is missing
147147

148148
If the server is already running, let the framework reload and check what it actually loaded: `patchstack-connect protect --check --runtime-url https://your-preview.example/api/contact` (loopback HTTP also works). You can supply the same `--runtime-url` to `setup`. This sends one signed, read-only OPTIONS challenge to that explicit URL, without sending the API key or following redirects. The response proves that a guard on that route loaded the current map, and reports its rule-readiness state and active rule counts. It does not prove other routes are covered or that an exploit is blocked. Both CLI and server need the site's server-side credential; `{ activationCheck: false }` disables the responder. If the guard cannot answer or carries an old map, restart/rebuild/deploy and check again. Setup never starts, builds or deploys your app.
149149

150-
Scaffolded guards refresh rules on a timer and on requests: once the rules are older than the refresh interval a request waits for the fetch, and every 30 seconds before that a serving guard re-checks in the background without holding any request, so a host that freezes between requests, or runs many copies of the app, picks up a rule change. Request-triggered refresh waits at most 2500ms by default, shares concurrent work, backs off after failures, and keeps last-known-good policy when offline. It never scans source or reports a manifest in the request path. A request with the header `x-patchstack-sync` runs that refresh straight away, at most once per 15 seconds; Patchstack sends one to the live site after its rules change. Hand-wired guards can configure `requestRefreshMs` (defaults to `refreshMs`, or zero when polling is disabled) and `requestRefreshTimeoutMs` (50–3000ms), or set the former to zero to opt out. `protection.synchronization` exposes the loaded identity, last successful lookup time, source health, readiness, rule counts (`delivered` from Patchstack or the bundled rules file, `local` from the guard's own response and outgoing rules; `request`, `response` and `egress` count both) and scoped-rule blocking counts without a network call. Rule refresh does not change the loaded map identity.
150+
Scaffolded guards refresh rules on a timer and on requests: once the rules are older than the refresh interval a request waits for the fetch, and every 30 seconds before that a serving guard re-checks in the background without holding any request, so a host that freezes between requests, or runs many copies of the app, picks up a rule change. Request-triggered refresh waits at most 2500ms by default, shares concurrent work, backs off after failures, and keeps last-known-good policy when offline. It never scans source or reports a manifest in the request path. A request with the header `x-patchstack-sync` runs that refresh straight away, at most once per 15 seconds; Patchstack sends one to the live site after its rules change. Hand-wired guards can configure `requestRefreshMs` (defaults to `refreshMs`, or zero when polling is disabled) and `requestRefreshTimeoutMs` (50–3000ms), or set the former to zero to opt out. `protection.synchronization` exposes the loaded identity, last successful lookup time, source health, readiness, rule counts and scoped-rule blocking counts without a network call. Rule refresh does not change the loaded map identity.
151151

152152
The authenticated rules response may include `X-Patchstack-Map-Rules: pending | ready` alongside `X-Patchstack-Build-Match` and `X-Patchstack-Build-ID`, including on a `304`. Readiness applies only when the response confirms the exact map identity requested. An absent or unrecognized readiness value means **unknown**, not ready. The ETag identifies the delivered policy, not map-generation completion. Broad and hardening rules remain usable while map-specific rules are pending.
153153

0 commit comments

Comments
 (0)