提交 72225944 编写于 作者: G George Claghorn

Add :location to process_action.action_controller payloads

上级 70013af6
* `process_action.action_controller` notifications include the `Location`
response header under `:location` in their payloads.
*George Claghorn*
* Updated `ActionDispatch::Request.remote_ip` setter to clear set the instance
`remote_ip` to `nil` before setting the header that the value is derived
from.
......
......@@ -31,7 +31,8 @@ def process_action(*)
ActiveSupport::Notifications.instrument("process_action.action_controller", raw_payload) do |payload|
result = super
payload[:status] = response.status
payload[:status] = response.status
payload[:location] = response.filtered_location
result
ensure
append_info_to_payload(payload)
......
......@@ -141,6 +141,7 @@ Action Controller
| `:method` | HTTP request verb |
| `:path` | Request path |
| `:status` | HTTP status code |
| `:location` | Location response header |
| `:view_runtime` | Amount spent in view in ms |
| `:db_runtime` | Amount spent executing database queries in ms |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册