diff --git a/src/paperless/settings.py b/src/paperless/settings.py index cd157c180..e40af01d1 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -95,11 +95,7 @@ MIDDLEWARE_CLASSES = [ ] # 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(",")) - +CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localhost:8080").split(",")) # If auth is disabled, we just use our "bypass" authentication middleware if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):