luisinder / remote-port-middleware
PSR-7 Middleware that determines the client remote port and stores it as an ServerRequest attribute
1.0.1
2016-09-28 15:39 UTC
Requires
- psr/http-message: ^1.0
This package is auto-updated.
Last update: 2024-12-20 04:51:59 UTC
README
PSR-7 Middleware that determines the client remote port and stores it as an ServerRequest
attribute called remotePort
.
Installation
composer require luisinder/remote-port-middleware
Usage
In Slim 3:
$app->add(new Luisinder\Middleware\RemotePort()); $app->get('/', function ($request, $response, $args) { $remotePort = $request->getAttribute('remotePort'); return $response; });