Hi Roger,
Client information can only be received by a serverside call and is not available directly from browser information.
This means you need a file on your system that you open and this can give you the client information.
I use a .lp file for this, so if you want to do this it means you need to do it by some self created startpage app or change the content of the index.html and redirect from there to your .lp file and this .lp file can determine based on IP what page should be shown.
I think i'ts easier to give every user a seperate acount and give acces to only there page.
I requested a option to give each user a selectable startpage, but it's not there yet, so lets hope my request will be build in some day (:
Sample of a .lp file that can do what you want:
Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?
require('apps')
clienthost = ngx.var.http_host
clientip = ngx.var.remote_addr
clientuser = request.username or 'anonymous'
?>
<script type="text/javascript">
var Client_Host = <? json.write(clienthost) ?>;
var Client_IP = <? json.write(clientip) ?>;
var Client_User = <? json.write(clientuser) ?>;
console.log(Client_Host);
console.log(Client_IP);
console.log(Client_User);
</script>
</body>
</html>
BR,
Erwin