app.get('/protocol', function (req, res) {
res.send(req.protocol);
});
Run Code Online (Sandbox Code Playgroud)
但是,您可能还需要为您的应用程序:enable trust proxy
app.configure('production', function () {
app.enable('trust proxy');
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2255 次 |
| 最近记录: |