问题
How to make use of X-AppEngine-Estimated-CPM-US-Dollars header in AppEngine. i read some docs, we can make use of it with only Administrator credentials, what is this mean?
if you have any samples please do share with us.
Thanks in Advance! :)
回答1:
I didn't do anything special to enable this functionality. I have role Owner
for my app as displayed on page https://appengine.google.com/ Administration > Permissions.
If I logout from my Google Account - this header dissapear.
Additional headers appear if I logged in into my Google Account and visit secured area on my site.
Secured area marked like this in web.xml
:
<security-constraint>
<web-resource-collection>
<web-resource-name>Administration resources</web-resource-name>
<url-pattern>/admin/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
And it looks like this in Firebug:
回答2:
The header itself is explained at http://googleappengine.blogspot.com/2009/08/new-features-in-124.html?m=1. It's 1,000 times what you would have paid Google to serve the page, if you had no free quotas. (Of course, actually serving the exact same page 1,000 times is likely to cost less because of caching.)
来源:https://stackoverflow.com/questions/10518225/usage-of-x-appengine-estimated-cpm-us-dollars-in-appengine