Skip to content

PSR-7 Middleware that determines the client remote port and stores it as an ServerRequest attribute

Notifications You must be signed in to change notification settings

luisinder/remote-port-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Client IP address middleware

Latest Stable Version Total Downloads

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;
});

About

PSR-7 Middleware that determines the client remote port and stores it as an ServerRequest attribute

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages