diff --git a/pwnedhub/__init__.py b/pwnedhub/__init__.py index f6fd306..c8c142f 100644 --- a/pwnedhub/__init__.py +++ b/pwnedhub/__init__.py @@ -1,4 +1,4 @@ -from flask import Flask, request, render_template, session, Blueprint, __version__ +from flask import Flask, request, render_template, Blueprint, __version__ from flask_session import Session from flask_sqlalchemy import SQLAlchemy from pwnedhub.utils import get_current_utc_time @@ -58,13 +58,6 @@ def add_header(response): response.headers['X-XSS-Protection'] = '1; mode=block' return response - @app.after_app_request - def restrict_flashes(response): - flashes = session.get('_flashes') - if flashes and len(flashes) > 5: - del session['_flashes'][0] - return response - StaticBlueprint = Blueprint('common', __name__, static_url_path='/static/common', static_folder='../common/static') app.register_blueprint(StaticBlueprint) diff --git a/pwnedhub/templates/layout.html b/pwnedhub/templates/layout.html index ed288dd..ae232f0 100644 --- a/pwnedhub/templates/layout.html +++ b/pwnedhub/templates/layout.html @@ -85,7 +85,7 @@ {% if get_flashed_messages() %}