New
v3.0.0
This is a major release.
Breaking
- Minimum node v18
- Removes
.redirect('back'), adds.back(fallback_url)@fl0w https://github.com/koajs/koa/pull/1115 - For
.redirect(), don't render redirect values in anchor ref https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312 req.originshould display the origin header if it exists, not the current hostname https://github.com/koajs/koa/issues/1008.originnow aligns with theOriginheader as used in CORS..body=<json>should not overwrite type if type already json https://github.com/koajs/koa/issues/1120- Remove special ENOENT support https://github.com/koajs/koa/pull/1861 - this is a big change and will require any file servers to adapt to this change for handling 404s / files not found
- Removes generator deprecation messages. Generators are no longer supported. Koa no longer asserts if generators are used. Set content-length: 0 if body is explicitly set to null @ognjenjevremovic #1528 Remove obsolete createAsyncCtxStorageMiddleware https://github.com/koajs/koa/pull/1817
- now requires a format of . See: https://www.npmjs.com/package/http-errors