Skip to content

Commit

Permalink
extend authorized psql database uri
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Mar 14, 2024
1 parent a62750d commit 3fd9825
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/geonature/utils/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ class GnPySchemaConf(Schema):
SQLALCHEMY_DATABASE_URI = fields.String(
required=True,
validate=Regexp(
"^postgresql:\/\/.*:.*@[^:]+:\w+\/\w+",
error="Database uri is invalid ex: postgresql://monuser:monpass@server:port/db_name",
"^(postgres(?:ql)?):\/\/(?:([^@\s]+)@)?([^\/\s]+)(?:\/(\w+))?(?:\?(.+))?",
error="PostgreSQL database URL is invalid. Check for authorized URL here : https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS",
),
)
SQLALCHEMY_TRACK_MODIFICATIONS = fields.Boolean(load_default=True)
Expand Down

0 comments on commit 3fd9825

Please sign in to comment.