Skip to content

Commit c94d2a7

Browse files
committed
add endpoint name in favicon example
1 parent 315ebc1 commit c94d2a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/patterns/favicon.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ the root path of the domain you either need to configure the web server to
2424
serve the icon at the root or if you can't do that you're out of luck. If
2525
however your application is the root you can simply route a redirect::
2626

27-
app.add_url_rule('/favicon.ico',
28-
redirect_to=url_for('static', filename='favicon.ico'))
27+
app.add_url_rule(
28+
"/favicon.ico",
29+
endpoint="favicon",
30+
redirect_to=url_for("static", filename="favicon.ico"),
31+
)
2932

3033
If you want to save the extra redirect request you can also write a view
3134
using :func:`~flask.send_from_directory`::

0 commit comments

Comments
 (0)