Skip to content

Commit

Permalink
add favicon route
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanbconaway committed Mar 17, 2024
1 parent 1f6b3cf commit 0d820eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import psycopg2
import pytz
from flask import Flask, render_template, request
from flask import Flask, render_template, request, send_from_directory
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
from flask_sqlalchemy import SQLAlchemy
Expand Down Expand Up @@ -188,3 +188,12 @@ def view_date(date_nyc):
def health():
"""Health check endpoint."""
return "OK"


@app.route("/favicon.ico")
def favicon():
return send_from_directory(
os.path.join(app.root_path, "static"),
"favicon.ico",
mimetype="image/vnd.microsoft.icon",
)

0 comments on commit 0d820eb

Please sign in to comment.