feat: add middlewares
This commit is contained in:
@@ -9,7 +9,7 @@ const DefaultPrefix = "Http"
|
||||
type Config struct {
|
||||
StaticPath *string
|
||||
StaticRoute *string
|
||||
Host *string
|
||||
BaseURI *string
|
||||
Port uint
|
||||
Tls *Tls
|
||||
Cors *Cors
|
||||
@@ -34,12 +34,5 @@ type Whitelist struct {
|
||||
}
|
||||
|
||||
func (h *Config) Address() string {
|
||||
if h.Host == nil {
|
||||
return h.PortString()
|
||||
}
|
||||
return fmt.Sprintf("%s:%d", *h.Host, h.Port)
|
||||
}
|
||||
|
||||
func (h *Config) PortString() string {
|
||||
return fmt.Sprintf(":%d", h.Port)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user