Add RedirectLocalhostURL for another form of redirect URL
This commit is contained in:
parent
bed01a303f
commit
5023050d95
1 changed files with 4 additions and 1 deletions
|
@ -41,6 +41,9 @@ const (
|
||||||
|
|
||||||
// RedirectPublicURL is redirect to local webserver when active with public name
|
// RedirectPublicURL is redirect to local webserver when active with public name
|
||||||
RedirectPublicURL = "http://localhost.rclone.org:" + bindPort + "/"
|
RedirectPublicURL = "http://localhost.rclone.org:" + bindPort + "/"
|
||||||
|
|
||||||
|
// RedirectLocalhostURL is redirect to local webserver when active with localhost
|
||||||
|
RedirectLocalhostURL = "http://localhost:" + bindPort + "/"
|
||||||
)
|
)
|
||||||
|
|
||||||
// oldToken contains an end-user's tokens.
|
// oldToken contains an end-user's tokens.
|
||||||
|
@ -196,7 +199,7 @@ func Config(name string, config *oauth2.Config) error {
|
||||||
// Detect whether we should use internal web server
|
// Detect whether we should use internal web server
|
||||||
useWebServer := false
|
useWebServer := false
|
||||||
switch config.RedirectURL {
|
switch config.RedirectURL {
|
||||||
case RedirectURL, RedirectPublicURL:
|
case RedirectURL, RedirectPublicURL, RedirectLocalhostURL:
|
||||||
useWebServer = true
|
useWebServer = true
|
||||||
case TitleBarRedirectURL:
|
case TitleBarRedirectURL:
|
||||||
fmt.Printf("Use auto config?\n")
|
fmt.Printf("Use auto config?\n")
|
||||||
|
|
Loading…
Reference in a new issue