mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 16:44:04 +08:00
chore: avoid aliasing models in middleware (#22484)
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
macaron "gopkg.in/macaron.v1"
|
||||
)
|
||||
|
||||
const HeaderNameNoBackendCache = "X-Grafana-NoCache"
|
||||
|
||||
func HandleNoCacheHeader() macaron.Handler {
|
||||
return func(ctx *m.ReqContext) {
|
||||
return func(ctx *models.ReqContext) {
|
||||
ctx.SkipCache = ctx.Req.Header.Get(HeaderNameNoBackendCache) == "true"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user