Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- [#1133](github.com/plotly/dash/pull/1133) Allow the `compress` config variable to be set with an environment variable with DASH_COMPRESS=FALSE

## [1.9.0] - 2020-02-04
### Fixed
- [#1080](https://github.com/plotly/dash/pull/1080) Handle case where dash fails to load when used inside an iframe with a sandbox attribute that only has allow-scripts
Expand Down
3 changes: 2 additions & 1 deletion dash/_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ def load_dash_env_vars():
'DASH_HOT_RELOAD_MAX_RETRY',
'DASH_SILENCE_ROUTES_LOGGING',
'DASH_PRUNE_ERRORS',
'DASH_COMPRESS'
)
}
)


DASH_ENV_VARS = load_dash_env_vars()
DASH_ENV_VARS = load_dash_env_vars() # used in tests


def get_combined_config(name, val, default=None):
Expand Down
6 changes: 4 additions & 2 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __init__(
requests_pathname_prefix=None,
routes_pathname_prefix=None,
serve_locally=True,
compress=True,
compress=None,
meta_tags=None,
index_string=_default_index,
external_scripts=None,
Expand Down Expand Up @@ -276,7 +276,9 @@ def __init__(
routes_pathname_prefix=routes_prefix,
requests_pathname_prefix=requests_prefix,
serve_locally=serve_locally,
compress=compress,
compress=get_combined_config(
"compress", compress, True
),
meta_tags=meta_tags or [],
external_scripts=external_scripts or [],
external_stylesheets=external_stylesheets or [],
Expand Down