Skip to content

Commit

Permalink
show_index parameter usage of app.router.add_static method documented
Browse files Browse the repository at this point in the history
Related: aio-libs#921
  • Loading branch information
Alexander Koshevoy authored and Alexander Koshevoy committed Aug 18, 2016
1 parent e378062 commit 40cbbd7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ To do it just register a new static route by

app.router.add_static('/prefix', path_to_static_folder)

When a directory is accessed within a static route then the server responses
to client with ``HTTP/403 Forbidden`` by default. Displaying folder index
instead could be enabled with ``show_index`` parameter set to ``True``::

app.router.add_static('/prefix', path_to_static_folder, show_index=True)


Template Rendering
------------------
Expand Down

0 comments on commit 40cbbd7

Please sign in to comment.