The Request ID middleware is highly flexible. The generator (IdGenerator) is used to create IDs, and you can define your own ID generator as long as it implements the IdGenerator
trait. The default generator provided is UlidGenerator
.
Additionally, you can control whether to overwrite an existing requestid
. You can also configure settings such as header_name
. For details, please refer to the documentation.
Example Code