mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-04 04:26:38 +08:00
Fix logo assets and license heartbeat
This commit is contained in:
@@ -120,6 +120,7 @@ func main() {
|
||||
}
|
||||
}()
|
||||
go services.Boot()
|
||||
go handler.RunLicenseHeartbeatLoop(services.Context(), services)
|
||||
go services.TelegramBot.StartPolling(context.Background())
|
||||
|
||||
// Graceful shutdown.
|
||||
@@ -201,6 +202,12 @@ func serveSPA(r *gin.Engine, webDir string) {
|
||||
c.Next()
|
||||
})
|
||||
assets.Static("/", filepath.Join(webDir, "assets"))
|
||||
brand := r.Group("/brand")
|
||||
brand.Use(func(c *gin.Context) {
|
||||
c.Header("Cache-Control", "public, max-age=86400")
|
||||
c.Next()
|
||||
})
|
||||
brand.Static("/", filepath.Join(webDir, "brand"))
|
||||
for _, icon := range []string{"/favicon.ico", "/favicon.svg"} {
|
||||
iconPath := filepath.Join(webDir, strings.TrimPrefix(icon, "/"))
|
||||
r.GET(icon, serveNoCacheFile(iconPath))
|
||||
|
||||
Reference in New Issue
Block a user