mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-26 06:07:05 +01:00
Prevent redirects for wrong server url
This commit is contained in:
parent
a986f7c87c
commit
d099882402
@ -49,6 +49,10 @@ func NewClient(c *cli.Context) (drone.Client, error) {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
auther.CheckRedirect = func(*http.Request, []*http.Request) error {
|
||||||
|
return fmt.Errorf("Attempting to redirect the requests. Did you configure the correct drone server address?")
|
||||||
|
}
|
||||||
|
|
||||||
trans, _ := auther.Transport.(*oauth2.Transport)
|
trans, _ := auther.Transport.(*oauth2.Transport)
|
||||||
|
|
||||||
if len(socks) != 0 && !socksoff {
|
if len(socks) != 0 && !socksoff {
|
||||||
|
Loading…
Reference in New Issue
Block a user