mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-23 02:34:14 +08:00
Minor cleanups
This commit is contained in:
parent
9cd6f35e9d
commit
da6a8cfc86
|
@ -24,7 +24,6 @@ func init() {
|
||||||
Name: "http",
|
Name: "http",
|
||||||
New: func() interface{} { return new(App) },
|
New: func() interface{} { return new(App) },
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
log.Printf("[ERROR] Handler: %s", err)
|
log.Printf("[ERROR] Handler: %s", err)
|
||||||
if handlerErr, ok := err.(HandlerError); ok {
|
if handlerErr, ok := err.(HandlerError); ok {
|
||||||
w.WriteHeader(handlerErr.StatusCode)
|
w.WriteHeader(handlerErr.StatusCode)
|
||||||
|
} else {
|
||||||
|
w.WriteHeader(http.StatusInternalServerError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,9 +104,6 @@ type ConnectionPolicy struct {
|
||||||
|
|
||||||
// TODO: Client auth
|
// TODO: Client auth
|
||||||
|
|
||||||
// TODO: see if starlark could be useful here - enterprise only
|
|
||||||
StarlarkHandshake string `json:"starlark_handshake,omitempty"`
|
|
||||||
|
|
||||||
matchers []ConnectionMatcher
|
matchers []ConnectionMatcher
|
||||||
certSelector certmagic.CertificateSelector
|
certSelector certmagic.CertificateSelector
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user