mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-05 20:49:48 +02:00
fix(config): password auth to be url-encoded to avoid some deployment errors (#1422)
This commit is contained in:
parent
a467999984
commit
20a22e2bc0
@ -1,4 +1,5 @@
|
||||
import os
|
||||
import urllib.parse
|
||||
|
||||
from danswer.configs.constants import AuthType
|
||||
from danswer.configs.constants import DocumentIndexType
|
||||
@ -117,7 +118,10 @@ except ValueError:
|
||||
# Below are intended to match the env variables names used by the official postgres docker image
|
||||
# https://hub.docker.com/_/postgres
|
||||
POSTGRES_USER = os.environ.get("POSTGRES_USER") or "postgres"
|
||||
POSTGRES_PASSWORD = os.environ.get("POSTGRES_PASSWORD") or "password"
|
||||
# URL-encode the password for asyncpg to avoid issues with special characters on some machines.
|
||||
POSTGRES_PASSWORD = urllib.parse.quote_plus(
|
||||
os.environ.get("POSTGRES_PASSWORD") or "password"
|
||||
)
|
||||
POSTGRES_HOST = os.environ.get("POSTGRES_HOST") or "localhost"
|
||||
POSTGRES_PORT = os.environ.get("POSTGRES_PORT") or "5432"
|
||||
POSTGRES_DB = os.environ.get("POSTGRES_DB") or "postgres"
|
||||
|
Loading…
x
Reference in New Issue
Block a user