mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-31 06:34:00 +00:00
Backport #28865 by @sdvcrx
Fix #28864
Co-authored-by: sdvcrx <memory.silentvoyage@gmail.com>
(cherry picked from commit 8c7bda8755
)
This commit is contained in:
parent
6aa5554161
commit
131a8f0324
2 changed files with 10 additions and 2 deletions
|
@ -170,8 +170,8 @@ func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbsslMode s
|
|||
RawQuery: dbParam,
|
||||
}
|
||||
query := connURL.Query()
|
||||
if strings.HasPrefix(dbHost, "/") { // looks like a unix socket
|
||||
query.Add("host", dbHost)
|
||||
if strings.HasPrefix(host, "/") { // looks like a unix socket
|
||||
query.Add("host", host)
|
||||
connURL.Host = ":" + port
|
||||
}
|
||||
query.Set("sslmode", dbsslMode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue