diff --git a/onionshare/web.py b/onionshare/web.py index f67a4b16..68b8fbc2 100644 --- a/onionshare/web.py +++ b/onionshare/web.py @@ -32,6 +32,7 @@ import io from distutils.version import LooseVersion as Version from urllib.request import urlopen +import flask from flask import ( Flask, Response, Request, request, render_template, abort, make_response, flash, redirect, __version__ as flask_version @@ -40,6 +41,15 @@ from werkzeug.utils import secure_filename from . import strings, common + +# Stub out flask's show_server_banner function, to avoiding showing warnings that +# are not applicable to OnionShare +def stubbed_show_server_banner(env, debug, app_import_path, eager_loading): + pass + +flask.cli.show_server_banner = stubbed_show_server_banner + + class Web(object): """ The Web object is the OnionShare web server, powered by flask