refactor: refresh webui

This commit is contained in:
Jacky 2024-04-30 09:53:45 +08:00
parent 59d59dd3ed
commit 4c7e037b76
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
138 changed files with 2232 additions and 1071 deletions

View file

@ -1,5 +1,9 @@
package settings
import (
"github.com/go-acme/lego/v4/lego"
)
type Server struct {
HttpHost string `json:"http_host" protected:"true"`
HttpPort string `json:"http_port" protected:"true"`
@ -16,6 +20,18 @@ type Server struct {
GithubProxy string `json:"github_proxy" binding:"omitempty,url"`
}
func (s *Server) GetCADir() string {
if s.Demo {
return lego.LEDirectoryStaging
}
if s.CADir != "" {
return s.CADir
}
return lego.LEDirectoryProduction
}
var ServerSettings = Server{
HttpHost: "0.0.0.0",
HttpPort: "9000",