Adds HEAD method in Static file serving
This commit is contained in:
parent
dda70bf382
commit
15c27c712d
3
gin.go
3
gin.go
@ -210,6 +210,9 @@ func (group *RouterGroup) Static(p, root string) {
|
|||||||
group.GET(p, func(c *Context) {
|
group.GET(p, func(c *Context) {
|
||||||
fileServer.ServeHTTP(c.Writer, c.Request)
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
})
|
})
|
||||||
|
group.HEAD(p, func(c *Context) {
|
||||||
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (group *RouterGroup) combineHandlers(handlers []HandlerFunc) []HandlerFunc {
|
func (group *RouterGroup) combineHandlers(handlers []HandlerFunc) []HandlerFunc {
|
||||||
|
Loading…
Reference in New Issue
Block a user