master
fangdingjun 8 years ago
parent 401596145d
commit 3497536f19

@ -11,7 +11,7 @@ type server struct {
Host string
Port int
Docroot string
UrlRules []rule
URLRules []rule
EnableProxy bool
Vhost []vhost
}
@ -21,7 +21,7 @@ type vhost struct {
Hostname string
Cert string
Key string
UrlRules []rule
URLRules []rule
}
type rule struct {

@ -36,7 +36,7 @@ func initRouters(cfg conf) {
}
}
r := router.Host(h2).Subrouter()
for _, rule := range h.UrlRules {
for _, rule := range h.URLRules {
switch rule.Type {
case "alias":
registerAliasHandler(rule, r)
@ -54,7 +54,7 @@ func initRouters(cfg conf) {
}
// default host config
for _, rule := range l.UrlRules {
for _, rule := range l.URLRules {
switch rule.Type {
case "alias":
registerAliasHandler(rule, router)

Loading…
Cancel
Save