| 1234567891011121314151617181920 |
- package middleware
- import (
- "strings"
- "github.com/Unknwon/macaron"
- )
- func Gziper() macaron.Handler {
- macaronGziper := macaron.Gziper()
- return func(ctx *macaron.Context) {
- requestPath := ctx.Req.URL.RequestURI()
- if strings.HasPrefix(requestPath, "/api/datasources/proxy") {
- return
- }
- ctx.Invoke(macaronGziper)
- }
- }
|