1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +00:00

Update to 6.0.3: Add an easy way to set a request body size limit per client or globally for newcomers

This commit is contained in:
Gerasimos (Makis) Maropoulos
2017-01-04 21:29:58 +02:00
parent 3b0a8e0f2d
commit d5a9410e2a
5 changed files with 93 additions and 9 deletions

View File

@@ -2,6 +2,25 @@
**How to upgrade**: remove your `$GOPATH/src/github.com/kataras` folder, open your command-line and execute this command: `go get -u github.com/kataras/iris/iris`.
## 6.0.2 -> 6.0.3
- Give the users an easy to way to set a limit to the body size comes from the client, globally or per-route (useful when you want to disable/enable limit on certain clients).
```go
// ...
const maxBodySize = 1 << 20
// ...
api := iris.New()
api.Use(iris.LimitRequestBodySize(maxBodySize))
// or do it manually under certain situations,
// inside the route's handler:
// ctx.SetMaxRequestBodySize(maxBodySize)
// routes after
```
## 6.0.1 -> 6.0.2
- Fix subdomains (silly fix by checking the Request.Host vs Request.URL.Host) and add a more realistic test, as reported [here](https://github.com/kataras/iris/issues/574).