mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 插入较大的资源文件时内存占用较大 https://github.com/siyuan-note/siyuan/issues/5023
This commit is contained in:
parent
dc46b478bc
commit
49b9f7bc92
7 changed files with 137 additions and 103 deletions
|
@ -44,7 +44,7 @@ var cookieStore = cookie.NewStore([]byte("ATN51UlxVq1Gcvdf"))
|
|||
func Serve(fastMode bool) {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
ginServer := gin.New()
|
||||
ginServer.MaxMultipartMemory = 1024 * 1024 * 1024 * 4
|
||||
ginServer.MaxMultipartMemory = 1024 * 1024 * 32 // 32MB
|
||||
ginServer.Use(gin.Recovery())
|
||||
ginServer.Use(cors.Default())
|
||||
ginServer.Use(gzip.Gzip(gzip.DefaultCompression, gzip.WithExcludedExtensions([]string{".pdf", ".mp3", ".wav", ".ogg", ".mov", ".weba", ".mkv", ".mp4", ".webm"})))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue