Skip to content

Commit d0eec0d

Browse files
committed
FEATURE-readme-refresh: correct peer-policy guidance
Correct admission precedence and supported IPv4 wildcard guidance in the native README. Groundwork initial audit and focused causal closure passed; strict Markdown/document gates pass, with unchanged compiled snippets and authenticated build/runtime evidence reused.
1 parent 2bc91d0 commit d0eec0d

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,10 @@ See [response_sources.cpp](examples/response_sources.cpp).
766766

767767
Configure `options.peer_policy()` before construction or use
768768
`server.peer_policy()` at runtime. The policy is enabled by default and starts
769-
in `peer_policy_mode::accept_all`: unmatched peers are admitted. In
770-
`reject_all`, unmatched peers are refused. In either mode a matching allow
771-
entry takes precedence over a deny entry. Disabled policy admits all peers.
769+
in `peer_policy_mode::accept_all`: unmatched peers are admitted, and a matching
770+
allow entry takes precedence over a deny entry. In `reject_all`, a peer is
771+
admitted only if it matches an allow entry and no deny entry. Disabled policy
772+
admits all peers.
772773

773774
Runtime mutations are synchronized and callable from handlers. `deny(pattern)`,
774775
`allow(pattern)`, `remove_denied(pattern)` and `remove_allowed(pattern)` return
@@ -786,10 +787,11 @@ http::outcome restrict_peers(srv::native_server& server) {
786787
}
787788
```
788789
789-
Patterns accept exact IPv4/IPv6 addresses, CIDR and trailing IPv4 wildcards
790-
such as `192.168.*.*`. IPv6 uses CIDR rather than wildcard components. Keep
791-
wildcards trailing; mapped IPv6 CIDR is rejected. Peer metadata is the transport
792-
peer, not an address asserted by an HTTP forwarding header. Admission decisions
790+
Patterns accept exact IPv4/IPv6 addresses, CIDR and a single final-octet IPv4
791+
wildcard such as `192.168.1.*`. Use CIDR, such as `192.168.0.0/16`, for larger
792+
subnets. IPv6 uses CIDR rather than wildcard components; mapped IPv6 CIDR is
793+
rejected. Peer metadata is the transport peer, not an address asserted by an
794+
HTTP forwarding header. Admission decisions
793795
are observable through `accept_decision`; live policy also participates in
794796
request dispatch. See [operations.cpp](examples/operations.cpp).
795797

0 commit comments

Comments
 (0)