[英]Google App Engine: Can I programmatically find out if this is the default version?
Is something to programmatically discover if the this request was for the default version, as opposed to another specific version set on the request. 是否可以通过编程方式发现此请求是否针对默认版本,而不是针对该请求设置的另一个特定版本。 I thought there may be something like: 我以为可能是这样的:
SystemProperty.isDefaultVersion
One not so full proof way you can get around this is by checking the URL. 您可以通过以下方法来解决此问题,其中一种不是完全证明的方法:检查URL。 If it matches X.name.appspot.com
, it probably isn't the default version. 如果与X.name.appspot.com
匹配,则可能不是默认版本。 It might be, but it's definitely not a normal user accessing your page and therefore probably a development operation. 可能是,但绝对不是普通用户访问您的页面,因此可能不是开发操作。
Far from perfect, but might be enough... 远非完美,但可能就足够了……
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.