使用GAE限制对静态文件的访问 [英] Limiting access to a static file with GAE

查看:111
本文介绍了使用GAE限制对静态文件的访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我不想公开的静态文件。有没有办法限制访问与app.yaml,以便它只能由其自己的域加载?

基于web2py的解决方案也欢迎,因为我使用它



谢谢!

通过'login:required'访问它以要求使用Google帐户登录,或者使用'login:admin'将其限制为仅限管理员。如果您只关注滥用行为,则可能需要查看 DOS API 代替。


I have a static file that I don't want to be publicly available. Is there a way to limit access with app.yaml so that it can only be loaded by its own domain?

web2py based solutions are also welcomed as I'm using it on top of GAE.

Thanks!

解决方案

You can limit access to it with 'login: required' to require login with a Google account, or 'login: admin' to restrict it to admins only. If you're only concerned about abuse, you probably want to look into the DOS API instead.

这篇关于使用GAE限制对静态文件的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆