在googleappengine/webapp2上,我使用self.request.host它在大多数情况下都可以工作,但偶尔不使用自定义域。在
http://%s % self.request.host # sometimes returns ver.proj.appspot.com instead of mydomain.com
我找到了这个文档https://cloud.google.com/appengine/docs/standard/python/appidentity/#getting_the_application_hostname,但我并不总是想要默认版本,如果不是自定义域,我需要这个版本。在
在self.request.host如果返回版本项目应用点.com已使用该URL请求它。在
相关问题 更多 >
编程相关推荐