You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/03/16 00:17:06 UTC
[GitHub] mistercrunch closed pull request #4617: Allowing config flag to turn off flask-compress
mistercrunch closed pull request #4617: Allowing config flag to turn off flask-compress
URL: https://github.com/apache/incubator-superset/pull/4617
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/docs/installation.rst b/docs/installation.rst
index 1e6e27d0ef..5cb4260544 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -173,6 +173,9 @@ work on Windows so the `superset runserver` command is not expected to work
in that context. Also note that the development web
server (`superset runserver -d`) is not intended for production use.
+If not using gunicorn, you may want to disable the use of flask-compress
+by setting `ENABLE_FLASK_COMPRESS = False` in your `superset_config.py`
+
Flask-AppBuilder Permissions
----------------------------
diff --git a/superset/__init__.py b/superset/__init__.py
index fbf11c0780..d420b764f3 100644
--- a/superset/__init__.py
+++ b/superset/__init__.py
@@ -168,7 +168,8 @@ def index(self):
ConnectorRegistry.register_sources(module_datasource_map)
# Flask-Compress
-Compress(app)
+if conf.get('ENABLE_FLASK_COMPRESS'):
+ Compress(app)
# Hook that provides administrators a handle on the Flask APP
# after initialization
diff --git a/superset/config.py b/superset/config.py
index 87da811fbb..a7e721089b 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -405,6 +405,10 @@ class CeleryConfig(object):
# return "-- [SQL LAB] {username} {dttm}\n sql"(**locals())
SQL_QUERY_MUTATOR = None
+# When not using gunicorn, (nginx for instance), you may want to disable
+# using flask-compress
+ENABLE_FLASK_COMPRESS = True
+
try:
if CONFIG_PATH_ENV_VAR in os.environ:
# Explicitly import config module that is not in pythonpath; useful
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services