I know that the google app engine come with the self.request for url and the path in the python platform.
What I wanted to know is that did it come with anything to return only the domain name?
This is because sometime in the localhost, mywebapps.appspot.com and www.mywebapps.com will have different kind of behavior.
Or is there any python code I can referring to?
Google app engine uses the CGI standard, you can use Host header in request from within the application code and respond accordingly.
How to access Host will depend on the web framework e.g webapp and django may differ in details, but as it is CGI you can just access os.environ from anywhere e.g.
import os
logging.debug("Host: %s"%os.environ['HTTP_HOST'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With