fix method
This commit is contained in:
@@ -119,6 +119,10 @@ func (s *Server) static(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (s *Server) _static(w http.ResponseWriter, r *http.Request) error {
|
||||
if r.Method != http.MethodGet {
|
||||
http.FileServer(s.fileDir).ServeHTTP(w, r)
|
||||
return nil
|
||||
}
|
||||
f, err := s.fileDir.Open(path.Clean(r.URL.Path))
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user