I start an local instance of google app engine using this command line
/usr/local/google_appengine/dev_appserver.py --host localhost --host 0.0.0.0 --port 8080 --admin_port 8081 .
Is there any GAE API that can let me retrieve the hostname (argument to the --host
parameter, in this case localhost
) I have passed to this the dev_appserver.py?
If you are using webapp2 on appengine you can access host property on the webapp2 request object.
https://webapp-improved.appspot.com/guide/request.html#common-request-attributes