Usage of X-AppEngine-Estimated-CPM-US-Dollars in AppEngine

扶醉桌前 提交于 2021-02-04 06:20:47

问题


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: enter image description here




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!