func (s *Settings) GetCorsAllowMethod() string {
	if s == nil || len(s.CorsAllowMethod) == 0 {
		return defaultCorsAllowMethod
	}
	return strings.Join(s.CorsAllowMethod, ", ")
}
GetCorsAllowMethod returns the Access-Control-Allow-Method.
package eventsource
import (
	"strings"
	"time"
)
const (
	defaultTimeout         = 2 * time.Second
	defaultAuthToken       = ""
	defaultHost            = "127.0.0.1"
	defaultPort            = 8080
	defaultCorsAllowOrigin = "127.0.0.1"
	defaultCorsAllowMethod = "GET"
)
type Settings struct {
	Timeout         time.Duration
	AuthToken       string
	Host            string
	Port            uint
	CorsAllowOrigin string
	CorsAllowMethod []string
}
func (s *Settings) GetTimeout() time.Duration {
	if s == nil || s.Timeout <= 0*time.Second {
		return defaultTimeout
	}
	return s.Timeout
}
func (s *Settings) GetAuthToken() string {
	if s == nil || len(s.AuthToken) <= 0 {
		return defaultAuthToken
	}
	return strings.TrimSpace(s.AuthToken)
}
func (s *Settings) GetHost() string {
	if s == nil || s.Host == "" {
		return defaultHost
	}
	return s.Host
}
func (s *Settings) GetPort() uint {
	if s == nil || s.Port == 0 {
		return defaultPort
	}
	return s.Port
}
func (s *Settings) GetCorsAllowOrigin() string {
	if s == nil || s.CorsAllowOrigin == "" {
		return defaultCorsAllowOrigin
	}
	return s.CorsAllowOrigin
}