提交 ea390853 编写于 作者: A Aaron Patterson

call `default_middleware_stack` before merging stacks

`default_middleware_stack` seems to kick off the `on_load` calls that
may mutate the middleware stack.  We have to call that method before
merging middleware stacks, otherwise the middleware stacks get mutated
*after* the app middleware stack is built.
上级 42070f89
......@@ -508,7 +508,8 @@ def helpers_paths
def app
@app || @app_build_lock.synchronize {
@app ||= begin
config.middleware = build_middleware.merge_into(default_middleware_stack)
stack = default_middleware_stack
config.middleware = build_middleware.merge_into(stack)
config.middleware.build(endpoint)
end
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册