Peter Kurfer
82a651cd5d
- replaced previous net/http based muxer and all other components with fiber - replaced polling with SSE to handle file changes - auto-update custom stylesheets - natively support mermaid diagrams - handle custom element attributes for lists properly - reload on config changes - replace JS templating with actual JS code and an API
12 lines
231 B
Go
12 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()
|
|
}
|