req.subdomains

中英双语

请求域名中的子域数组。

// Host: "tobi.ferrets.example.com"
console.dir(req.subdomains)
// => ['ferrets', 'tobi']

应用程序属性 subdomain offset,默认为 2,用于确定子域段的开始。要更改此行为,请使用 app.set 更改其值。