mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 12:31:58 +00:00
apps.Switch(apps.Hosts...) example
This commit is contained in:
@@ -30,8 +30,9 @@ type Configurator func(su *Supervisor)
|
||||
//
|
||||
// Interfaces are separated to return relative functionality to them.
|
||||
type Supervisor struct {
|
||||
Server *http.Server
|
||||
friendlyAddr string // e.g mydomain.com instead of :443 when AutoTLS is used, see `WriteStartupLogOnServe` task.
|
||||
Server *http.Server
|
||||
// FriendlyAddr can be set to customize the "Now Listening on: {FriendlyAddr}".
|
||||
FriendlyAddr string // e.g mydomain.com instead of :443 when AutoTLS is used, see `WriteStartupLogOnServe` task.
|
||||
disableHTTP1ToHTTP2Redirection bool
|
||||
closedManually uint32 // future use, accessed atomically (non-zero means we've called the Shutdown)
|
||||
closedByInterruptHandler uint32 // non-zero means that the end-developer interrupted it by-purpose.
|
||||
@@ -350,7 +351,7 @@ func (su *Supervisor) ListenAndServeAutoTLS(domain string, email string, cacheDi
|
||||
|
||||
if strings.TrimSpace(domain) != "" {
|
||||
domains := strings.Split(domain, " ")
|
||||
su.friendlyAddr = domains[0]
|
||||
su.FriendlyAddr = strings.Join(domains, ", ")
|
||||
hostPolicy = autocert.HostWhitelist(domains...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user