You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no issue
- extracted from expressjs/vhost#21
- uses `req.hostname` if it's available. `req.hostname` is set to the `x-forwarded-host` value when `'trust proxy'` setting is enabled in express
Copy file name to clipboardExpand all lines: ghost/vhost-middleware/README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,10 @@ property will be populated with an object. This object will have numeric propert
35
35
corresponding to each wildcard (or capture group if RegExp object provided) and the
36
36
`hostname` that was matched.
37
37
38
+
Where the `hostname` of the request comes from depends on the type of server you're running.
39
+
If you're running a raw Node.js/connect server, this comes from [`req.headers.host`](https://nodejs.org/dist/latest/docs/api/http.html#http_message_headers).
40
+
If you're running an express v4 server, this comes from [`req.hostname`](http://expressjs.com/en/4x/api.html#req.hostname).
0 commit comments