*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 25a44508 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Make Flask-Minify opt-in

* it looks like the extension may have been linked with issues regarding
  user-related operations such as login and file upload, so we decided
  to make it opt-in for now
parent b0cdb3e4
No related branches found
No related tags found
1 merge request!53Make Flask-Minify opt-in
......@@ -52,6 +52,9 @@ CONFIG_TUW_READ_ONLY_MODE = False
CONFIG_TUW_DISABLE_ERROR_MAILS = False
"""Disable registration of the SMTP mail handler to suppress warnings."""
CONFIG_TUW_MINIFY_ENABLED = False
"""Enable or disable the Flask-Minify extension."""
# Invenio-Mail
# ============
......
......@@ -78,7 +78,12 @@ class InvenioConfigTUW(object):
app.config[key] = app.config["DATACITE_USERNAME"]
def init_minify(self, app):
"""Initialize the Flask-Minify extension."""
if "flask-minify" not in app.extensions:
"""Initialize the Flask-Minify extension.
It seems like this extension may cause issues with certain user-related
operations in the system and has thus been disabled by default.
"""
minify_enabled = app.config.get("CONFIG_TUW_MINIFY_ENABLED", False)
if minify_enabled and "flask-minify" not in app.extensions:
minify = Minify(app, static=False, go=False)
app.extensions["flask-minify"] = minify
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment