mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 04:52:35 +02:00
fix file server validation
This commit is contained in:
parent
3353060ad4
commit
4363ca88aa
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ func (r *Route) Validate() (err E.Error) {
|
|||
switch r.Scheme {
|
||||
case types.SchemeFileServer:
|
||||
r.impl, err = NewFileServer(r)
|
||||
if err != nil {
|
||||
errs.Add(err)
|
||||
}
|
||||
case types.SchemeHTTP, types.SchemeHTTPS:
|
||||
if r.Port.Listening != 0 {
|
||||
errs.Addf("unexpected listening port for %s scheme", r.Scheme)
|
||||
|
|
Loading…
Add table
Reference in a new issue