summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-02-02 13:20:49 -0500
committerjim-p <jimp@pfsense.org>2017-02-02 21:20:21 -0500
commit50b9cd384546f056437c13a173d67c59b8b1f242 (patch)
treee4ffaed39d0f2b32ed499240f2ad531ff76e8714 /src/usr
parent40c875d33cd1ee404a0931c04498a3124d3b2e6e (diff)
downloadpfsense-50b9cd384546f056437c13a173d67c59b8b1f242.zip
pfsense-50b9cd384546f056437c13a173d67c59b8b1f242.tar.gz
Provide info on services_checkip.php about what the server must return, and provide two examples of server-side code to return the client address. Fixes #6374
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/services_checkip.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/usr/local/www/services_checkip.php b/src/usr/local/www/services_checkip.php
index 90d389f..511e9ef 100644
--- a/src/usr/local/www/services_checkip.php
+++ b/src/usr/local/www/services_checkip.php
@@ -191,11 +191,32 @@ endforeach; ?>
</nav>
<div class="infoblock">
- <?php print_info_box(gettext(
+ <?php print_info_box(gettext('The server must return the client IP address ' .
+ 'as a string in the following format: ') .
+ '<pre>Current IP Address: x.x.x.x</pre>' .
+ gettext(
'The first (highest in list) enabled check ip service will be used to ' .
'check IP addresses for Dynamic DNS services, and ' .
- 'RFC 2136 entries that have the "Use public IP" option enabled.'
- ), 'info', false); ?>
+ 'RFC 2136 entries that have the "Use public IP" option enabled.') .
+ '<br/><br/>'
+ , 'info', false);
+
+ print_info_box(gettext('Sample Server Configurations') .
+ '<br/>' .
+ gettext('nginx with LUA') . ':' .
+ '<pre> location = /ip {
+ default_type text/html;
+ content_by_lua \'
+ ngx.say("' . htmlspecialchars('<html><head><title>Current IP Check</title></head><body>') . 'Current IP Address: ")
+ ngx.say(ngx.var.remote_addr)
+ ngx.say("' . htmlspecialchars('</body></html>') . '")
+ \';
+ }</pre>' .
+ gettext('PHP') .
+ '<pre>' .
+ htmlspecialchars('<html><head><title>Current IP Check</title></head><body>Current IP Address: <?=$_SERVER[\'REMOTE_ADDR\']?></body></html>') .
+ '</pre>'
+ , 'info', false); ?>
</div>
<?php include("foot.inc");
OpenPOWER on IntegriCloud