Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
51a2f7bb
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
51a2f7bb
编写于
4月 23, 2016
作者:
T
Tom Kadwill
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Actionpack documentation typos [ci skip]
上级
0f8eefa6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
10 deletion
+10
-10
actionpack/lib/action_controller/metal/force_ssl.rb
actionpack/lib/action_controller/metal/force_ssl.rb
+4
-4
actionpack/lib/action_controller/metal/http_authentication.rb
...onpack/lib/action_controller/metal/http_authentication.rb
+2
-2
actionpack/lib/action_controller/metal/instrumentation.rb
actionpack/lib/action_controller/metal/instrumentation.rb
+2
-2
actionpack/lib/action_controller/metal/live.rb
actionpack/lib/action_controller/metal/live.rb
+2
-2
未找到文件。
actionpack/lib/action_controller/metal/force_ssl.rb
浏览文件 @
51a2f7bb
...
...
@@ -2,17 +2,17 @@
require
'active_support/core_ext/hash/slice'
module
ActionController
# This module provides a method which will redirect browser to use HTTPS
# This module provides a method which will redirect
the
browser to use HTTPS
# protocol. This will ensure that user's sensitive information will be
# transferred safely over the internet. You _should_ always force browser
# transferred safely over the internet. You _should_ always force
the
browser
# to use HTTPS when you're transferring sensitive information such as
# user authentication, account information, or credit card information.
#
# Note that if you are really concerned about your application security,
# you might consider using +config.force_ssl+ in your config file instead.
# That will ensure all the data transferred via HTTPS protocol and prevent
#
user from getting session hijacked when accessing the site under unsecured
# HTTP protocol.
#
the user from getting their session hijacked when accessing the site over
#
unsecured
HTTP protocol.
module
ForceSSL
extend
ActiveSupport
::
Concern
include
AbstractController
::
Callbacks
...
...
actionpack/lib/action_controller/metal/http_authentication.rb
浏览文件 @
51a2f7bb
...
...
@@ -310,9 +310,9 @@ def nonce(secret_key, time = Time.now)
end
# Might want a shorter timeout depending on whether the request
# is a PATCH, PUT, or POST, and if
client is
browser or web service.
# is a PATCH, PUT, or POST, and if
the client is a
browser or web service.
# Can be much shorter if the Stale directive is implemented. This would
# allow a user to use new nonce without prompting user again for their
# allow a user to use new nonce without prompting
the
user again for their
# username and password.
def
validate_nonce
(
secret_key
,
request
,
value
,
seconds_to_timeout
=
5
*
60
)
return
false
if
value
.
nil?
...
...
actionpack/lib/action_controller/metal/instrumentation.rb
浏览文件 @
51a2f7bb
...
...
@@ -75,8 +75,8 @@ def halted_callback_hook(filter)
ActiveSupport
::
Notifications
.
instrument
(
"halted_callback.action_controller"
,
:filter
=>
filter
)
end
# A hook which allows you to clean up any time taken into account in
# views
wrongly
, like database querying time.
# A hook which allows you to clean up any time
, wrongly
taken into account in
# views, like database querying time.
#
# def cleanup_view_runtime
# super - time_taken_in_something_expensive
...
...
actionpack/lib/action_controller/metal/live.rb
浏览文件 @
51a2f7bb
...
...
@@ -3,7 +3,7 @@
require
'active_support/json'
module
ActionController
# Mix this module in
to your controller, and all actions in that controller
# Mix this module into your controller, and all actions in that controller
# will be able to stream data to the client as it's written.
#
# class MyController < ActionController::Base
...
...
@@ -20,7 +20,7 @@ module ActionController
# end
# end
#
# There are a few caveats with this
us
e. You *cannot* write headers after the
# There are a few caveats with this
modul
e. You *cannot* write headers after the
# response has been committed (Response#committed? will return truthy).
# Calling +write+ or +close+ on the response stream will cause the response
# object to be committed. Make sure all headers are set before calling write
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录