Current client location

142 views
Skip to first unread message

Deepak Singh

unread,
Sep 4, 2012, 3:20:22 PM9/4/12
to google-a...@googlegroups.com
Hi,

Is it possible to get to know the client location (city, country) of any RPC call made to the server?

I mean to say that any request header that app-engine is using to identify the browser location?

Thanks
Deepak Singh

Bryce Cutt

unread,
Sep 4, 2012, 4:17:20 PM9/4/12
to google-a...@googlegroups.com
It is in the request headers. See X-AppEngine-Country, X-AppEngine-Region, X-AppEngine-City, and X-AppEngine-CityLatLong:

Kaan Soral

unread,
Sep 5, 2012, 5:27:57 AM9/5/12
to google-a...@googlegroups.com
It was great to learn about "X-AppEngine-CityLatLong" however I guess there is no placeholder for it in the SDK?

Bryce Cutt

unread,
Sep 5, 2012, 2:21:51 PM9/5/12
to google-a...@googlegroups.com
As far as I can tell the SDK does not populate these headers with any value. You can detect you are running on the dev server and handle things differently (with default values).

If you need to know the location of a users IP from the dev server there are GeoIP services online that you can request this information from but there is likely a cost to use them

- Bryce.

Barry Hunter

unread,
Sep 5, 2012, 2:27:29 PM9/5/12
to google-a...@googlegroups.com
How about sending fake ones with a browser extension?
https://addons.mozilla.org/en-US/firefox/addon/modify-headers/

I would be surprised if the local SDK bothers to filter them out.
Reply all
Reply to author
Forward
0 new messages