netmaker/controllers/files.go

20 lines
416 B
Go
Raw Normal View History

2021-03-26 00:17:52 +08:00
package controller
import (
2021-10-09 03:07:12 +08:00
"net/http"
2022-09-07 03:27:21 +08:00
"github.com/gorilla/mux"
2021-03-26 00:17:52 +08:00
)
func fileHandlers(r *mux.Router) {
2022-09-07 03:27:21 +08:00
// swagger:route GET /meshclient/files/{filename} meshclient fileServer
//
2022-09-11 12:51:59 +08:00
// Retrieve a file from the file server.
2022-09-07 03:27:21 +08:00
//
// Schemes: https
//
// Security:
// oauth
2021-03-26 00:17:52 +08:00
r.PathPrefix("/meshclient/files").Handler(http.StripPrefix("/meshclient/files", http.FileServer(http.Dir("./meshclient/files"))))
}