summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-04 19:15:26 +0300
committerWolfy-J <[email protected]>2019-05-04 19:15:26 +0300
commit325fcb1819fae87699676dfe3ced21c40917b90f (patch)
tree5d9a0919666610528dc4cbef7bbbe230df0f890b /tests
parent6d802fabb1be5408ecff53612040fb7a2c9048b8 (diff)
real ip tests
Diffstat (limited to 'tests')
-rw-r--r--tests/http/ip.php11
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