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
389ddfa8
authored
Jan 06, 2026
by
Xyfacai
Committed by
GitHub
Jan 06, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #2590 from xyfacai/fix/max-body-limit
fix: 设置默认max req body 为128MB
parent
28327106
Show 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 @
389ddfa8
...
@@ -118,7 +118,7 @@ func initConstantEnv() {
...
@@ -118,7 +118,7 @@ func initConstantEnv() {
constant
.
MaxFileDownloadMB
=
GetEnvOrDefault
(
"MAX_FILE_DOWNLOAD_MB"
,
64
)
constant
.
MaxFileDownloadMB
=
GetEnvOrDefault
(
"MAX_FILE_DOWNLOAD_MB"
,
64
)
constant
.
StreamScannerMaxBufferMB
=
GetEnvOrDefault
(
"STREAM_SCANNER_MAX_BUFFER_MB"
,
64
)
constant
.
StreamScannerMaxBufferMB
=
GetEnvOrDefault
(
"STREAM_SCANNER_MAX_BUFFER_MB"
,
64
)
// MaxRequestBodyMB 请求体最大大小(解压后),用于防止超大请求/zip bomb导致内存暴涨
// MaxRequestBodyMB 请求体最大大小(解压后),用于防止超大请求/zip bomb导致内存暴涨
constant
.
MaxRequestBodyMB
=
GetEnvOrDefault
(
"MAX_REQUEST_BODY_MB"
,
64
)
constant
.
MaxRequestBodyMB
=
GetEnvOrDefault
(
"MAX_REQUEST_BODY_MB"
,
128
)
// ForceStreamOption 覆盖请求参数,强制返回usage信息
// ForceStreamOption 覆盖请求参数,强制返回usage信息
constant
.
ForceStreamOption
=
GetEnvOrDefaultBool
(
"FORCE_STREAM_OPTION"
,
true
)
constant
.
ForceStreamOption
=
GetEnvOrDefaultBool
(
"FORCE_STREAM_OPTION"
,
true
)
constant
.
CountToken
=
GetEnvOrDefaultBool
(
"CountToken"
,
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