zooxsmart/request-id
最新稳定版本:1.0.2
Composer 安装命令:
composer require zooxsmart/request-id
包简介
PHP middleware to add a Request ID header
README 文档
README
This middleware adds a Request ID header that can be used to trace back requests (logs).
It uses [Ramsey\Uuid(https://github.com/ramsey/uuid) library as default uuid generation.
Usage
Just add the middleware as one of the first in your application.
For example:
$app->pipe(new \LosMiddleware\RequestId\RequestId($options);
And the middleware will add a header to the request AND response
X-Request-Id: 56CEE969-4D3B-404E-9938-03E769E191CB
The options are:
- allow_override: If it's allowed to override a previouly added request id header. Default: false
- header_name: Header name. Default: X-Request-Id
Laminas
If you are using laminas-skeleton, you can copy config/los-request-id.global.php.dist to config/autoload/los-request-id.global.php and modify configuration as your needs.
统计信息
- 总下载量: 9.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-31