Skip to content

Commit

Permalink
docs: middleware factories run for every request
Browse files Browse the repository at this point in the history
  • Loading branch information
butla committed Aug 29, 2017
1 parent 6d27412 commit a98d2e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/2225.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document that all app's middleware factories are run for every request.
4 changes: 4 additions & 0 deletions docs/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,10 @@ the **next** *middleware factory*. The last *middleware factory* always receives
the :ref:`request handler <aiohttp-web-handler>` selected by the router itself
(by :meth:`UrlDispatcher.resolve`).

.. note::

The chain of factories is run for every handled request.

*Middleware factories* should return a new handler that has the same signature
as a :ref:`request handler <aiohttp-web-handler>`. That is, it should accept a
single :class:`Request` instance and return a :class:`Response`, or raise an
Expand Down

0 comments on commit a98d2e6

Please sign in to comment.