“think_all_requests_local"的目的在 config/environments/development.rb 中? [英] Purpose of "consider_all_requests_local" in config/environments/development.rb?

查看:14
本文介绍了“think_all_requests_local"的目的在 config/environments/development.rb 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个 Rails 配置设置的目的是什么...

What is the purpose of this Rails config setting...

config.action_controller.consider_all_requests_local = true

config/environments/development.rb 中默认设置为 true.

It's set to true by default in config/environments/development.rb.

谢谢,

伊森

推荐答案

非本地请求会导致用户友好的错误页面.假定来自开发人员的本地请求会看到更有用的错误消息,其中包括行号和回溯.think_all_requests_local 允许您的应用显示这些开发人员友好的消息,即使发出请求的机器是远程的.

Non-local requests result in user-friendly error pages. Local requests, assumed to come from developers, see a more useful error message that includes line numbers and a backtrace. consider_all_requests_local allows your app to display these developer-friendly messages even when the machine making the request is remote.

这篇关于“think_all_requests_local"的目的在 config/environments/development.rb 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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