add ctx.host= delegate

This commit is contained in:
TJ Holowaychuk 2014-01-07 17:22:46 -08:00
parent 43a8c12028
commit 26fb6a138a
2 changed files with 9 additions and 0 deletions

View file

@ -119,6 +119,7 @@ throw err;
- `ctx.querystring=` - `ctx.querystring=`
- `ctx.length` - `ctx.length`
- `ctx.host` - `ctx.host`
- `ctx.host=`
- `ctx.fresh` - `ctx.fresh`
- `ctx.stale` - `ctx.stale`
- `ctx.socket` - `ctx.socket`

View file

@ -275,6 +275,14 @@ module.exports = {
return this.request.host; return this.request.host;
}, },
/**
* Delegate to Request#host=.
*/
set host(val) {
this.request.host = val;
},
/** /**
* Delegate to Request#fresh. * Delegate to Request#fresh.
*/ */