Skip to content

Commit 0810f2b

Browse files
albsga4zhaohuabing
authored andcommitted
docs: regenerate API reference for CSRF filterEnabled/shadowEnabled
Signed-off-by: asalvador <asalvador@newrelic.com>
1 parent 9f0a756 commit 0810f2b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

site/content/en/latest/api/extension_types.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,12 +846,19 @@ The CSRF filter checks that the Origin header in HTTP requests matches the desti
846846
preventing cross-origin mutating requests (POST, PUT, DELETE, PATCH) from being processed.
847847
GET and HEAD requests are always allowed.
848848

849+
Note: Envoy's CSRF filter compares against the host and port of the origin only
850+
(the scheme is stripped before matching). Additional origins must be specified as
851+
host or host:port values, not full URLs. For example, use "www.example.com"
852+
instead of "https://www.example.com".
853+
849854
_Appears in:_
850855
- [SecurityPolicySpec](#securitypolicyspec)
851856

852857
| Field | Type | Required | Default | Description |
853858
| --- | --- | --- | --- | --- |
854-
| `additionalOrigins` | _[StringMatch](#stringmatch) array_ | false | | AdditionalOrigins specifies additional origins that are allowed to make requests.<br />These are checked against the Origin header and if matched, the request is allowed.<br />Each origin can be an exact, prefix, suffix, or regex match using StringMatch. |
859+
| `filterEnabled` | _integer_ | false | | FilterEnabled specifies the percentage of requests for which the CSRF filter is enabled.<br />When set, only the given percentage of requests will have CSRF protection enforced.<br />Defaults to 100 (fully enabled) if not specified. |
860+
| `shadowEnabled` | _integer_ | false | | ShadowEnabled specifies the percentage of requests for which the CSRF filter is in<br />shadow/dry-run mode. In this mode, the filter evaluates requests and tracks whether<br />they would be allowed or rejected, but does not enforce the policy.<br />This is useful for rolling out CSRF protection gradually while monitoring the impact.<br />Only takes effect when FilterEnabled is not set or is 0. |
861+
| `additionalOrigins` | _[StringMatch](#stringmatch) array_ | false | | AdditionalOrigins specifies additional origins that are allowed to make requests,<br />beyond the destination origin. These are checked against the Origin header (host:port only,<br />not the full URL) and if matched, the request is allowed.<br />Each origin supports Exact, Prefix, Suffix, and RegularExpression matching. |
855862

856863

857864
#### CircuitBreaker

0 commit comments

Comments
 (0)