开发者

Can I protect with a .htaccess file some routes with sinatra?

I开发者_如何学Python wrote a small app with Sinatra and have some admin routes (/admin/new, admin/edit/2, ...) and want to protect them with a .htaccess prompt. Can somebody tell me how I do that?


AuthName "Restricted Area"
AuthType Basic
AuthUserFile /path/to/file/.htpasswd

<Files "protected.html">
Require valid-user
</Files>

If you want to use Sinatra for Authentication, check out this faq.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜