From 912201957d484e40a83b6707f39ae42993c1e988 Mon Sep 17 00:00:00 2001 From: Harsha Narayana Date: Tue, 8 Oct 2019 21:51:36 +0530 Subject: [PATCH] GIT-37: add changelog Signed-off-by: Harsha Narayana --- changelogs/37.bugfix.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelogs/37.bugfix.rst diff --git a/changelogs/37.bugfix.rst b/changelogs/37.bugfix.rst new file mode 100644 index 0000000000..80c00a3f10 --- /dev/null +++ b/changelogs/37.bugfix.rst @@ -0,0 +1,11 @@ +Fix blueprint middleware application + +Currently, any blueprint middleware registered, irrespective of which blueprint was used to do so, was +being applied to all of the routes created by the :code:`@app` and :code:`@blueprint` alike. + +As part of this change, the blueprint based middleware application is enforced based on where they are +registered. + +- If you register a middleware via :code:`@blueprint.middleware` then it will apply only to the routes defined by the blueprint. +- If you register a middleware via :code:`@blueprint_group.middleware` then it will apply to all blueprint based routes that are part of the group. +- If you define a middleware via :code:`@app.middleware` then it will be applied on all available routes