Use /scripts to avoid CF caching
This commit is contained in:
14
assets.go
14
assets.go
@ -11,17 +11,19 @@ import (
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Scripts
|
||||
js := components.JS()
|
||||
|
||||
app.Get("/scripts", func(ctx *aero.Context) string {
|
||||
ctx.SetResponseHeader("Content-Type", "application/javascript")
|
||||
return js
|
||||
})
|
||||
|
||||
// Web manifest
|
||||
app.Get("/manifest.json", func(ctx *aero.Context) string {
|
||||
return ctx.JSON(app.Config.Manifest)
|
||||
})
|
||||
|
||||
// Scripts
|
||||
app.Get("/scripts.js", func(ctx *aero.Context) string {
|
||||
ctx.SetResponseHeader("Content-Type", "application/javascript")
|
||||
return components.JS()
|
||||
})
|
||||
|
||||
// Favicon
|
||||
app.Get("/favicon.ico", func(ctx *aero.Context) string {
|
||||
return ctx.TryWebP("images/brand/64", ".png")
|
||||
|
Reference in New Issue
Block a user