Adds option to enable compression of webserver responses

This commit is contained in:
Trenton H committed 2023-02-12 14:45:51 -08:00
1 parent 8b3d01c49b
commit 3b0fa4f707
6 files changed
+185 -19

No files matched your search

+4 -1
View File
@@ -297,6 +297,10 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
# Optional to enable compression
if __get_boolean("PAPERLESS_ENABLE_COMPRESSION"):
MIDDLEWARE.insert(0, "compression_middleware.middleware.CompressionMiddleware")
ROOT_URLCONF = "paperless.urls"
FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")
@@ -314,7 +318,6 @@ _CELERY_REDIS_URL, _CHANNELS_REDIS_URL = _parse_redis_url(
os.getenv("PAPERLESS_REDIS", None),
)
# TODO: what is this used for?
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",