java - Identifying a client behind router/firewall -


in web-app need register http clients accessing local network behind router.

i started remotehost : remoteport combination, enough became clear, port numer gets regenereated upon each connection.

i need able identify clients on similar mac address, property doesn't change. wanted use headers[ "x-forwarded-for" ], it's not present @ all:

[pragma=no-cache, cache-control=no-cache, host=somhost.com:8822, upgrade=websocket, connection=upgrade, sec-websocket-key=scnlm7hzjjy3ckljhjcia==, sec-websocket-extensions=x-webkit-deflate-frame,deflate-frame, sec-websocket-version=13]

what other options identify clients?

you use api key, is, unique identifier clients send along each request identify themselves. depending on authentication method using, consider standard http authorization header send value:

authorization: api-key <value goes here> 

or create custom http header purpose. careful custom headers: proxies might strip them out.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -