A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Refs feedback:
Solo1bb80548d200
diff --git a/paperless.conf.example b/paperless.conf.exampleindex 3d90b2915..8aa33216f 100644--- a/paperless.conf.example+++ b/paperless.conf.example@@ -89,6 +89,11 @@ PAPERLESS_EMAIL_SECRET=""# as is "example.com,www.example.com", but NOT " example.com" or "example.com,"#PAPERLESS_ALLOWED_HOSTS="example.com,www.example.com"+# If you decide to use Paperless APIs in an ajax calls, you need to add your+# servers to the allowed hosts that can do CORS calls. By default Paperless allows+# calls from localhost:8080. The same rules as above how the list should look like.+#PAPERLESS_CORS_ALLOWED_HOSTS="localhost:8080,example.com,localhost:8000"+# To host paperless under a subpath url like example.com/paperless you set# this value to /paperless. No trailing slash!#diff --git a/requirements.txt b/requirements.txtindex 81dcbb6d5..125a89ac7 100644--- a/requirements.txt+++ b/requirements.txt@@ -5,7 +5,7 @@ chardet==3.0.4coverage==4.5.1coveralls==1.3.0dateparser==0.7.0-django-cors-headers=2.4.0+django-cors-headers==2.4.0django-crispy-forms==1.7.2django-extensions==2.0.7django-filter==1.1.0diff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex ed79adade..cd157c180 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -94,8 +94,12 @@ MIDDLEWARE_CLASSES = ['django.middleware.clickjacking.XFrameOptionsMiddleware',]-# We allow CORS from localhosts-CORS_ORIGIN_REGEX_WHITELIST = (r'^(https?:\/\/)?localhost(:[0-9]{4})?$', )+# We allow CORS from localhost:8080+CORS_ORIGIN_WHITELIST = ("localhost:8080")+_allowed_cors_hosts = os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS")+if _allowed_cors_hosts:+ CORS_ORIGIN_WHITELIST = tuple(_allowed_cors_hosts.split(","))+# If auth is disabled, we just use our "bypass" authentication middlewareif bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):