Files
quyun/backend_v1/providers/http/config.go
Rogee 24bd161df9
Some checks failed
build quyun / Build (push) Has been cancelled
feat: add backend_v1 migration
2025-12-19 14:46:58 +08:00

39 lines
538 B
Go

package http
import (
"fmt"
)
const DefaultPrefix = "Http"
type Config struct {
StaticPath *string
StaticRoute *string
BaseURI *string
Port uint
Tls *Tls
Cors *Cors
}
type Tls struct {
Cert string
Key string
}
type Cors struct {
Mode string
Whitelist []Whitelist
}
type Whitelist struct {
AllowOrigin string
AllowHeaders string
AllowMethods string
ExposeHeaders string
AllowCredentials bool
}
func (h *Config) Address() string {
return fmt.Sprintf(":%d", h.Port)
}