mirror of
				https://github.com/songquanpeng/one-api.git
				synced 2025-11-04 15:53:42 +08:00 
			
		
		
		
	fix: do not cache index.html
This commit is contained in:
		@@ -16,6 +16,7 @@ func SetWebRouter(router *gin.Engine, buildFS embed.FS, indexPage []byte) {
 | 
			
		||||
	router.Use(middleware.Cache())
 | 
			
		||||
	router.Use(static.Serve("/", common.EmbedFolder(buildFS, "web/build")))
 | 
			
		||||
	router.NoRoute(func(c *gin.Context) {
 | 
			
		||||
		c.Header("Cache-Control", "no-cache, no-store, must-revalidate")
 | 
			
		||||
		c.Data(http.StatusOK, "text/html; charset=utf-8", indexPage)
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user