diff --git a/docs/api/context.md b/docs/api/context.md index 56e1e52..0fb0032 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -119,6 +119,7 @@ throw err; - `ctx.querystring=` - `ctx.length` - `ctx.host` + - `ctx.host=` - `ctx.fresh` - `ctx.stale` - `ctx.socket` diff --git a/lib/context.js b/lib/context.js index 7a4fd6a..87e50eb 100644 --- a/lib/context.js +++ b/lib/context.js @@ -275,6 +275,14 @@ module.exports = { return this.request.host; }, + /** + * Delegate to Request#host=. + */ + + set host(val) { + this.request.host = val; + }, + /** * Delegate to Request#fresh. */