Suma
Suma

Reputation: 34393

Check Google App Engine server parameters

I have learned in another question how can I detect if I am running on development or a production server. Is there some way how to get programmatically following:

I can special case them for a development / production, but it smells to me - getting those values from a server would seem nicer to me. Is there a way?

I need those values so that I can construct redirectUri for OAuth authentication.

Upvotes: 0

Views: 40

Answers (1)

marcadian
marcadian

Reputation: 2618

It depends on the web framework you're using. If you're using webapp2, you can get it from the request attribute

https://webapp-improved.appspot.com/guide/request.html#common-request-attributes

For java servlet, http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html

Upvotes: 1

Related Questions