1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 12:27:02 +00:00

breaking change: remove static field context.DefaultMaxMemory and replace it with a better configurable option inside the main configuration, this makes things clear and it allows users to prevent any unwanted client behavior without digging into the framework's internals

Former-commit-id: 875afd32acfab8abdea15ce9be2ad384eb6bad5e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-12-27 20:42:46 +02:00
parent 6254ade603
commit 90c825efc8
5 changed files with 124 additions and 35 deletions

View File

@@ -54,6 +54,14 @@ type ConfigurationReadOnly interface {
// used for templates and the rest of the responses.
GetCharset() string
// GetPostMaxMemory returns the maximum configured post data size
// that a client can send to the server, this differs
// from the overral request body size which can be modified
// by the `context#SetMaxRequestBodySize` or `iris#LimitRequestBodySize.
//
// Defaults to 32MB or 32 << 20 if you prefer.
GetPostMaxMemory() int64
// GetTranslateLanguageContextKey returns the configuration's TranslateFunctionContextKey value,
// used for i18n.
GetTranslateFunctionContextKey() string