Browse Source

fix ssh domain default value to domain (#930)

Lunny Xiao 3 years ago
parent
commit
cf47532ebc
1 changed files with 4 additions and 1 deletions
  1. 4 1
      modules/setting/setting.go

+ 4 - 1
modules/setting/setting.go

@@ -96,7 +96,7 @@ var (
96 96
 	}{
97 97
 		Disabled:           false,
98 98
 		StartBuiltinServer: false,
99
-		Domain:             "localhost",
99
+		Domain:             "",
100 100
 		Port:               22,
101 101
 		KeygenPath:         "ssh-keygen",
102 102
 	}
@@ -623,6 +623,9 @@ please consider changing to GITEA_CUSTOM`)
623 623
 		LandingPageURL = LandingPageHome
624 624
 	}
625 625
 
626
+	if len(SSH.Domain) == 0 {
627
+		SSH.Domain = Domain
628
+	}
626 629
 	SSH.RootPath = path.Join(homeDir, ".ssh")
627 630
 	SSH.KeyTestPath = os.TempDir()
628 631
 	if err = Cfg.Section("server").MapTo(&SSH); err != nil {