Пример #1
0
func (h *StaticHandler) Setup(engine *gin.Engine) {
	fs := gin.Dir(h.Root, false)
	h.fileServer = http.StripPrefix("/", http.FileServer(fs))

	engine.GET("/*filepath", h.Handle)
	engine.HEAD("/*filepath", h.Handle)

	return
}