mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 09:18:51 +02:00
initial support of homepage labels
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
|
||||
. "github.com/yusing/go-proxy/internal/common"
|
||||
D "github.com/yusing/go-proxy/internal/docker"
|
||||
H "github.com/yusing/go-proxy/internal/homepage"
|
||||
U "github.com/yusing/go-proxy/internal/utils"
|
||||
F "github.com/yusing/go-proxy/internal/utils/functional"
|
||||
)
|
||||
|
||||
@@ -18,9 +20,10 @@ type (
|
||||
Scheme string `yaml:"scheme" json:"scheme"`
|
||||
Host string `yaml:"host" json:"host"`
|
||||
Port string `yaml:"port" json:"port"`
|
||||
NoTLSVerify bool `yaml:"no_tls_verify" json:"no_tls_verify"` // https proxy only
|
||||
PathPatterns []string `yaml:"path_patterns" json:"path_patterns"` // http(s) proxy only
|
||||
Middlewares D.NestedLabelMap `yaml:"middlewares" json:"middlewares"`
|
||||
NoTLSVerify bool `yaml:"no_tls_verify" json:"no_tls_verify,omitempty"` // https proxy only
|
||||
PathPatterns []string `yaml:"path_patterns" json:"path_patterns,omitempty"` // http(s) proxy only
|
||||
Middlewares D.NestedLabelMap `yaml:"middlewares" json:"middlewares,omitempty"`
|
||||
Homepage *H.HomePageItem `yaml:"homepage" json:"homepage"`
|
||||
|
||||
/* Docker only */
|
||||
*D.ProxyProperties `yaml:"-" json:"proxy_properties"`
|
||||
@@ -37,6 +40,11 @@ func (e *RawEntry) FillMissingFields() {
|
||||
e.ProxyProperties = &D.ProxyProperties{}
|
||||
}
|
||||
|
||||
if e.Homepage == nil {
|
||||
e.Homepage = H.HomePageItemDefault()
|
||||
e.Homepage.Name = U.Title(e.Alias)
|
||||
}
|
||||
|
||||
lp, pp, extra := e.splitPorts()
|
||||
|
||||
if port, ok := ServiceNamePortMapTCP[e.ImageName]; ok {
|
||||
|
||||
Reference in New Issue
Block a user