Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3523acfc
authored
Dec 20, 2025
by
CaIon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(init): increase MaxRequestBodyMB to enhance request handling
parent
f2d2b6e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
common/init.go
+1
-1
No files found.
common/init.go
View file @
3523acfc
...
...
@@ -118,7 +118,7 @@ func initConstantEnv() {
constant
.
MaxFileDownloadMB
=
GetEnvOrDefault
(
"MAX_FILE_DOWNLOAD_MB"
,
20
)
constant
.
StreamScannerMaxBufferMB
=
GetEnvOrDefault
(
"STREAM_SCANNER_MAX_BUFFER_MB"
,
64
)
// MaxRequestBodyMB 请求体最大大小(解压后),用于防止超大请求/zip bomb导致内存暴涨
constant
.
MaxRequestBodyMB
=
GetEnvOrDefault
(
"MAX_REQUEST_BODY_MB"
,
32
)
constant
.
MaxRequestBodyMB
=
GetEnvOrDefault
(
"MAX_REQUEST_BODY_MB"
,
64
)
// ForceStreamOption 覆盖请求参数,强制返回usage信息
constant
.
ForceStreamOption
=
GetEnvOrDefaultBool
(
"FORCE_STREAM_OPTION"
,
true
)
constant
.
CountToken
=
GetEnvOrDefaultBool
(
"CountToken"
,
true
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment