Google App Engine URL Fetch 为 X-Forwarded-For 标头设置的值是什么?
文档说 (http://code.google.com/appengine /docs/java/urlfetch/overview.html#Request_Headers):
这些标头由 App Engine 根据情况设置为准确的值
X-Forwarded-For 的值是否包含 gae 应用程序的某些标识?
Documentation says (http://code.google.com/appengine/docs/java/urlfetch/overview.html#Request_Headers):
These headers are set to accurate values by App Engine, as appropriate
Does the value for X-Forwarded-For included some identity of the gae application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您访问 shell.appspot.com 并运行以下代码:
您将看到(截至 2009 年年底)AppEngine 现在将 appid 放入用户代理标头中。 所以你的用户代理最终看起来像:
If you go to shell.appspot.com and run the following code:
You will see that (as of sometime near the end of 2009) AppEngine now puts the appid into the user-agent header. So your user-agent ends up looking like:
目前,在 URLFetch 发出的请求中,X-Forwarded-For 似乎未设置。
您可以通过访问 http://shell.appspot.com/ 并执行 URLFetch 来亲自验证这一点对于回显 HTTP 请求的网站 - 例如 http://www.showhttprequest.com/ 。 App Engine 将用户代理字符串设置为“AppEngine-Google; (+http://code.google.com/appengine )",但根本不设置 X-Forwarded-For。
Currently, X-Forwarded-For appears to be unset in requests made by URLFetch.
You can verify this for yourself by going to http://shell.appspot.com/ and doing a URLFetch for a site that echoes HTTP requests - for example, http://www.showhttprequest.com/ . App Engine sets the User Agent string to "AppEngine-Google; (+http://code.google.com/appengine)", but doesn't set X-Forwarded-For at all.