mirror of
https://github.com/H0llyW00dzZ/My-RESTAPIs-Boilerplate.git
synced 2025-02-06 09:44:31 +00:00
Docs [Environment variable] Update Comments for "SIZE_BODY_LIMIT" (#1500)
- [+] docs(env.go): update comments for SIZEBODYLIMIT to include security considerations and best practices for request body size
This commit is contained in:
parent
b966b66680
commit
185ccc8e62
8
env/env.go
vendored
8
env/env.go
vendored
@ -38,7 +38,13 @@ const (
|
||||
|
||||
// App/Server Capacity Configuration
|
||||
const (
|
||||
SIZEBODYLIMIT = "SIZE_BODY_LIMIT" // The maximum size limit for the request body (default: "4MiB" (equivalent to 4 * 1024 * 1024 bytes)).
|
||||
// The maximum size limit for the request body (default: "4MiB", equivalent to 4 * 1024 * 1024 bytes).
|
||||
//
|
||||
// Note: For security reasons, you should be careful when setting the size of the request body. For example, if you set it to more than 4MiB (e.g., 100MiB),
|
||||
// it can lead to resource exhaustion due to excessive memory consumption, which may cause a crash with an OOM (Out Of Memory) error on Kubernetes,
|
||||
// especially when using the "immutable" tag. Therefore, if you need to handle large request bodies, such as for file uploads,
|
||||
// you should use the Stream method to process the data in smaller chunks.
|
||||
SIZEBODYLIMIT = "SIZE_BODY_LIMIT"
|
||||
)
|
||||
|
||||
// MySQL Database Configuration
|
||||
|
Loading…
x
Reference in New Issue
Block a user