diff options
author | jim-p <jimp@pfsense.org> | 2017-02-02 13:20:49 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-02-02 13:20:49 -0500 |
commit | 186c7a6ca49af0d848c1082bfd7f6d9f0cde7046 (patch) | |
tree | 4b2194c75e72a36d5b7e10636ab11e7419fe1773 /src/usr/local/www | |
parent | d2a2f01832587f3cc3925032bc75d2116c83c8fe (diff) | |
download | pfsense-186c7a6ca49af0d848c1082bfd7f6d9f0cde7046.zip pfsense-186c7a6ca49af0d848c1082bfd7f6d9f0cde7046.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/local/www')
-rw-r--r-- | src/usr/local/www/services_checkip.php | 27 |
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 ca84ce0..cab0a6a 100644 --- a/src/usr/local/www/services_checkip.php +++ b/src/usr/local/www/services_checkip.php @@ -158,11 +158,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"); |