A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Activate whitenoise and static file compression and caching
Florian Gabsteiger528b4ac2f0ab
diff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex 917d1e64f..ce387be07 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -62,6 +62,7 @@ FORCE_SCRIPT_NAME = os.getenv("PAPERLESS_FORCE_SCRIPT_NAME")# Application definitionINSTALLED_APPS = [+ "whitenoise.runserver_nostatic","django.contrib.auth","django.contrib.contenttypes",@@ -92,6 +93,7 @@ if os.getenv("PAPERLESS_INSTALLED_APPS"):MIDDLEWARE = ['django.middleware.security.SecurityMiddleware',+ 'whitenoise.middleware.WhiteNoiseMiddleware','django.contrib.sessions.middleware.SessionMiddleware','corsheaders.middleware.CorsMiddleware','django.middleware.common.CommonMiddleware',@@ -101,6 +103,9 @@ MIDDLEWARE = ['django.middleware.clickjacking.XFrameOptionsMiddleware',]+# Enable whitenoise compression and caching+STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'+# We allow CORS from localhost:8080CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localhost:8080").split(","))