Skip to content

Commit fa9b0da

Browse files
refactor: rename MaxAge to CacheControl
1 parent b4f2a26 commit fa9b0da

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ smtp:
8888
disable: false # (false, true)
8989
host: ""
9090
port: 1025
91-
auth:
92-
username: username
93-
password: password
9491

9592
# Endpoints for envelopes
9693
endpoints:

web/controllers/controllers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func Index(retentionPolicy models.RetentionPolicy) func(c *fiber.Ctx, cc *core.C
4040
func Files(app core.App) fiber.Handler {
4141
return filesystem.New(filesystem.Config{
4242
Root: http.FS(app.File.FS),
43-
MaxAge: web.MaxAge,
43+
MaxAge: web.CacheControl,
4444
})
4545
}
4646

web/web_dev.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
var Development = true
1717

18-
const MaxAge = 0
18+
const CacheControl = 0
1919

2020
var pathAssets string
2121
var pathViews string

web/web_not_dev.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
var Development = false
1616

17-
const MaxAge = 3600
17+
const CacheControl = 3600
1818

1919
//go:embed dist
2020
var assets embed.FS
@@ -30,7 +30,7 @@ func AssetsFS() fs.FS {
3030
func UseAssets(app *fiber.App) {
3131
app.Use(filesystem.New(filesystem.Config{
3232
Root: http.FS(AssetsFS()),
33-
MaxAge: MaxAge,
33+
MaxAge: CacheControl,
3434
}))
3535
}
3636

0 commit comments

Comments
 (0)