Skip to content
Myr

add endpoint name in favicon example (#5701)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by GitHub · parents 315ebc1, c94d2a7 · Browse files · 1 file+5 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−2 removed

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:docs/patterns/favicon.rst+5 added-2 removed
22 unmodified lines
23the root path of the domain you either need to configure the web server to24serve the icon at the root or if you can't do that you're out of luck. If25however your application is the root you can simply route a redirect::2627 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 )3233If you want to save the extra redirect request you can also write a view34using :func:`~flask.send_from_directory`::35
21 unmodified lines