mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-18 07:54:28 +00:00
12 lines
338 B
Go
12 lines
338 B
Go
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) {
|
|
c.Header("X-DRONE-VERSION", version.Version.String())
|
|
}
|