2016-05-02 19:21:25 +00:00
|
|
|
package middleware
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/drone/drone/version"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Version is a middleware function that appends the Drone version information
|
|
|
|
// to the HTTP response. This is intended for debugging and troubleshooting.
|
|
|
|
func Version(c *gin.Context) {
|
2017-04-12 11:04:39 +00:00
|
|
|
c.Header("X-DRONE-VERSION", version.Version.String())
|
2016-05-02 19:21:25 +00:00
|
|
|
}
|