【发布时间】:2020-11-24 08:14:54
【问题描述】:
如何获取 NestJS 正在处理的页面的完整 URL? (例如 http://localhost:3000/hoge)
//
// If you implement it with express, it looks like this.
// e.g. http://localhost:3000/hoge
//
function getFullUrl(req: express.Request) {
return `${req.protocol}://${req.get('Host')}${req.originalUrl}`;
}
【问题讨论】:
标签: nestjs