在 Rails 3 应用程序中隐藏 url [英] Hiding urls in a Rails 3 application

查看:71
本文介绍了在 Rails 3 应用程序中隐藏 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了提高站点安全性,我想在 Rails 3 应用程序中屏蔽或隐藏 url.我不想要友好"的网址.我希望只在浏览器地址中显示域.我读到它在 rails 2 中是可能的,但在 rails 3 中是不可能的.如果这是真的,我还能做什么?

In an attempt to improve site security, I would like to mask or hide urls in a Rails 3 application. I don't want "friendly" urls. I would prefer that just the domain be displayed in the browser address. I read that it is possible in rails 2 but not in rails 3. If that is true, what else can i do?

更新:隐藏身份是我能做的最好的事情吗?如果是这样,最好的方法是什么?

UPDATE: Is hiding ID's the best i can do? If so, what is the best method?

谢谢.

推荐答案

查看一些授权解决方案.CanCan 过去曾为我工作过,而且实施起来很简单.

Check out some authorization solutions. CanCan has worked for me in the past and is simple to implement.

阅读您的问题后,这并不能满足您的要求(屏蔽网址),但是如果您的目标是提高站点安全性,那么实施授权解决方案比仅向最终用户隐藏网址要干净得多.

After reading your question this doesn't do what you want (mask urls), but if your goal is to improve site security implementing an authorization solution is a much cleaner thing to do than just hiding urls from an end user.

这篇关于在 Rails 3 应用程序中隐藏 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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