Skip to content

Commit

Permalink
fix file server validation
Browse files Browse the repository at this point in the history
  • Loading branch information
yusing committed Feb 10, 2025
1 parent 3353060 commit 4363ca8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/route/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4363ca8

Please sign in to comment.