13 lines
231 B
Go
13 lines
231 B
Go
|
package api
|
||
|
|
||
|
import "github.com/gofiber/fiber/v2"
|
||
|
|
||
|
func NoCache(app *fiber.App) {
|
||
|
app.Use(NoCacheHandler)
|
||
|
}
|
||
|
|
||
|
func NoCacheHandler(ctx *fiber.Ctx) error {
|
||
|
ctx.Response().Header.Set("Cache-Control", "no-cache")
|
||
|
return ctx.Next()
|
||
|
}
|