https://github.com/lansoweb/response-time
PHP middleware to add a response time header to the response
https://github.com/lansoweb/response-time
middleware php response-time
Last synced: about 1 month ago
JSON representation
PHP middleware to add a response time header to the response
- Host: GitHub
- URL: https://github.com/lansoweb/response-time
- Owner: Lansoweb
- License: mit
- Created: 2015-11-20T11:44:41.000Z (over 9 years ago)
- Default Branch: 2.3.x
- Last Pushed: 2023-09-19T16:24:37.000Z (over 1 year ago)
- Last Synced: 2025-04-08T07:06:05.016Z (about 1 month ago)
- Topics: middleware, php, response-time
- Language: PHP
- Homepage:
- Size: 27.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Response Time Middleware for PHP
This middleware adds a Response Time header
## Usage
Just add the middleware as one of the first in your application.
For example:
```php
$app->pipe(new \Los\ResponseTime\ResponseTime($options);
```And the middleware will add a header
```
X-Request-Time: 49,96ms
```The options are:
* header_name: Header name. Default: X-Response-Time### Mezzio
If you are using [mezzio-skeleton](https://github.com/mezzio/mezzio-skeleton),
you can copy `config/los-response-time.global.php.dist` to
`config/autoload/los-response-time.global.php` and modify configuration as your needs.