From cba4ab68f1cd6732ccff1202303f550a3a7a2ea0 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Wed, 29 May 2019 11:18:32 +0900 Subject: [PATCH] fix: [flask] Added favicon.ico --- install_dependencies.sh | 3 ++- server.py | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/install_dependencies.sh b/install_dependencies.sh index e9beb8e..51d86b6 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -35,7 +35,8 @@ mkdir -p css fonts js popd mkdir -p temp -wget http://www.misp-project.org/assets/images/misp-small.png -O static/pics/MISP.png +wget https://www.misp-project.org/assets/images/misp-small.png -O static/pics/MISP.png +wget https://www.misp-project.org/favicon.ico -O static/favicon.ico # jquery JQVERSION="3.2.1" diff --git a/server.py b/server.py index e7da6a6..ab2a2e5 100755 --- a/server.py +++ b/server.py @@ -14,7 +14,7 @@ import redis import util from flask import (Flask, Response, jsonify, render_template, request, - stream_with_context) + send_from_directory, stream_with_context) from helpers import (contributor_helper, geo_helper, live_helper, trendings_helper, users_helper) @@ -141,6 +141,10 @@ def index(): zoomlevel=cfg.getint('Dashboard' ,'zoomlevel') ) +@app.route('/favicon.ico') +def favicon(): + return send_from_directory(os.path.join(app.root_path, 'static'), + 'favicon.ico', mimetype='image/vnd.microsoft.icon') @app.route("/geo") def geo():