Skip to content

Commit aca9c04

Browse files
committed
Update docs
1 parent bc99621 commit aca9c04

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎user_guide_src/source/incoming/filters.rst‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ Request ID
389389
This filter adds a unique request ID to each request in context of the application. This can be useful for
390390
debugging and logging purposes, as it allows you to trace a specific request through the application.
391391

392-
This ID is generated by the framework and is unique to this request. It is added to the request's context
393-
and can be accessed via the ``request_id`` key.
392+
Framework-generated IDs are unique for practical purposes, however valid incoming IDs are reused.
393+
It is added to the request's context and can be accessed via the ``request_id`` key.
394394

395395
The ID is generated via ``bin2hex(random_bytes(16))``, so it is a 32-character hexadecimal string.
396396

@@ -399,5 +399,7 @@ To enable this filter, simply un-comment the ``requestid`` alias in the ``$requi
399399
.. literalinclude:: filters/014.php
400400

401401
.. note:: If the incoming request has a header named ``X-Request-ID``, the value of that header
402-
will be used as the request ID instead of generating a new one. This allows you to pass in
403-
your own request ID if you have one available, such as from a client or a load balancer.
402+
will be used as the request ID instead of generating a new one or checking for uniqueness.
403+
The framework does basic validation to ensure that the incoming request ID is a non-empty string,
404+
has at most 255 characters, and contains only valid characters (alphanumeric, dot, underscore, colon, and hyphen).
405+
If the validation fails, a new request ID will be generated as normal. This allows you to pass in your own request ID if you have one available, such as from a client or a load balancer.

0 commit comments

Comments
 (0)