mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Backport #28708 by wxiaoguang Regression of #27723 Fix #28705 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 7f833d8f71b71b0e983ed979c5ad8088aec7fb7d)
This commit is contained in:
parent
2b8b1ab0ae
commit
ad027c2818
2 changed files with 5 additions and 1 deletions
|
@ -170,7 +170,7 @@ func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbsslMode s
|
|||
RawQuery: dbParam,
|
||||
}
|
||||
query := connURL.Query()
|
||||
if dbHost[0] == '/' { // looks like a unix socket
|
||||
if strings.HasPrefix(dbHost, "/") { // looks like a unix socket
|
||||
query.Add("host", dbHost)
|
||||
connURL.Host = ":" + port
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue