This commit is contained in:
jongleberry
2025-04-27 17:59:14 -07:00
parent e63b22d50c
commit 44b568f90f
3 changed files with 5 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
You can quickly install a supported version of Node with your favorite version manager:
```bash
$ nvm install 12
$ nvm install 22
$ npm i koa
$ node my-koa-app.js
```
@@ -93,6 +93,7 @@ app.listen(3000);
- `app.subdomainOffset` offset of `.subdomains` to ignore, default to 2
- `app.proxyIpHeader` proxy ip header, default to `X-Forwarded-For`
- `app.maxIpsCount` max ips read from proxy ip header, default to 0 (means infinity)
- `app.asyncLocalStorage`
You can pass the settings to the constructor:
```js

View File

@@ -416,7 +416,7 @@ ctx.acceptsLanguages();
### request.idempotent
Check if the request is idempotent.
Check if the request is idempotent (e.g. a `GET`, `HEAD`, etc. request).
### request.socket

View File

@@ -349,8 +349,8 @@ ctx.response.etag = crypto.createHash('md5').update(ctx.body).digest('hex');
### response.flushHeaders()
Flush any set headers, and begin the body.
Flush any set headers to the client. This is a proxy for [`res.flushHeaders()`](https://nodejs.org/api/http.html#requestflushheaders)
### response.writable
A boolean that indicates whether the response is still writable
A boolean that indicates whether the response is still writable.