cgi/ip: New simple service to print client's IP address.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 1 Apr 2017 10:11:49 +0000 (11:11 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 1 Apr 2017 10:11:49 +0000 (11:11 +0100)
Supports IPv6. ;-)

cgi/ip [new file with mode: 0755]

diff --git a/cgi/ip b/cgi/ip
new file mode 100755 (executable)
index 0000000..026617b
--- /dev/null
+++ b/cgi/ip
@@ -0,0 +1,7 @@
+#! /usr/bin/perl
+print <<EOF;
+Content-type: text/plain; charset=us-ascii
+
+$ENV{REMOTE_ADDR}
+EOF
+exit 0;