mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 16:46:50 +01:00
Allow psql client certificate authentication
This commit is contained in:
parent
741152dd50
commit
a5c6dab7c3
2 changed files with 36 additions and 1 deletions
|
|
@ -509,7 +509,12 @@ if os.getenv("PAPERLESS_DBHOST"):
|
|||
|
||||
else: # Default to PostgresDB
|
||||
engine = "django.db.backends.postgresql_psycopg2"
|
||||
options = {"sslmode": os.getenv("PAPERLESS_DBSSLMODE", "prefer")}
|
||||
options = {
|
||||
"sslmode": os.getenv("PAPERLESS_DBSSLMODE", "prefer"),
|
||||
"sslrootcert": os.getenv("PAPERLESS_DBSSLROOTCERT", None),
|
||||
"sslcert": os.getenv("PAPERLESS_DBSSLCERT", None),
|
||||
"sslkey": os.getenv("PAPERLESS_DBSSLKEY", None),
|
||||
}
|
||||
|
||||
DATABASES["default"]["ENGINE"] = engine
|
||||
DATABASES["default"]["OPTIONS"].update(options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue