Skip to content

Commit ceb66b6

Browse files
committed
Tap, tap goes the middleware
1 parent f9995ce commit ceb66b6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

actionpack/lib/action_dispatch/middleware/request_id.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ def initialize(app)
1919

2020
def call(env)
2121
env["action_dispatch.request_id"] = external_request_id(env) || internal_request_id
22-
status, headers, body = @app.call(env)
23-
24-
headers["X-Request-Id"] = env["action_dispatch.request_id"]
25-
[ status, headers, body ]
22+
@app.call(env).tap { |status, headers, body| headers["X-Request-Id"] = env["action_dispatch.request_id"] }
2623
end
2724

2825
private

0 commit comments

Comments
 (0)