Added favicon

This commit is contained in:
Fabio Manganiello 2019-02-24 19:59:08 +01:00
parent 06564b043e
commit 2adab13d50
2 changed files with 10 additions and 1 deletions

View File

@ -4,16 +4,18 @@ import re
from flask import Blueprint, abort, send_from_directory
from platypush.config import Config
from platypush.backend.http.app import template_folder
from platypush.backend.http.app import template_folder, base_folder
from platypush.backend.http.app.utils import authenticate, authentication_ok, \
send_message
resources = Blueprint('resources', __name__, template_folder=template_folder)
favicon = Blueprint('favicon', __name__, template_folder=template_folder)
# Declare routes list
__routes__ = [
resources,
favicon,
]
@resources.route('/resources/<path:path>', methods=['GET'])
@ -52,4 +54,11 @@ def resources_path(path):
return send_from_directory(real_path, file_path)
@favicon.route('/favicon.ico', methods=['GET'])
def favicon():
""" favicon.ico icon """
return send_from_directory(os.path.join(base_folder, 'static', 'resources'),
'favicon.ico')
# vim:sw=4:ts=4:et:

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB