diff options
author | Wolfy-J <[email protected]> | 2019-05-04 19:15:26 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2019-05-04 19:15:26 +0300 |
commit | 325fcb1819fae87699676dfe3ced21c40917b90f (patch) | |
tree | 5d9a0919666610528dc4cbef7bbbe230df0f890b /tests | |
parent | 6d802fabb1be5408ecff53612040fb7a2c9048b8 (diff) |
real ip tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http/ip.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/http/ip.php b/tests/http/ip.php new file mode 100644 index 00000000..2253e3f8 --- /dev/null +++ b/tests/http/ip.php @@ -0,0 +1,11 @@ +<?php + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; + +function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface +{ + $resp->getBody()->write($req->getServerParams()['REMOTE_ADDR']); + + return $resp; +}
\ No newline at end of file |