You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aca9c04
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: user_guide_src/source/incoming/filters.rst
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -389,8 +389,8 @@ Request ID
389
389
This filter adds a unique request ID to each request in context of the application. This can be useful for
390
390
debugging and logging purposes, as it allows you to trace a specific request through the application.
391
391
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.
394
394
395
395
The ID is generated via ``bin2hex(random_bytes(16))``, so it is a 32-character hexadecimal string.
396
396
@@ -399,5 +399,7 @@ To enable this filter, simply un-comment the ``requestid`` alias in the ``$requi
399
399
.. literalinclude:: filters/014.php
400
400
401
401
.. 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