forked from NYANDEV/forgejo
Fix internal requests when gitea listens to unix socket or only external IP (#2234)
* Fix internal requests when gitea listens to unix socket or only external IP * When Gitea is set to listen using FastCGI use AppURL for LocalURL
This commit is contained in:
parent
a4ca54425f
commit
fa8d40faca
4 changed files with 34 additions and 12 deletions
|
@ -5,7 +5,6 @@
|
|||
package private
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
|
@ -25,9 +24,7 @@ func PushUpdate(opt models.PushUpdateOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
resp, err := newRequest(reqURL, "POST").Body(body).SetTLSClientConfig(&tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
}).Response()
|
||||
resp, err := newInternalRequest(reqURL, "POST").Body(body).Response()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue