為甚麼req.protocol 總是回傳http 而不是https ?
在Express.js,明明網址是https://xxxx.com 為甚麼req.protocol 卻總是回傳http 而不是https ?
可以試試加入這行:
app = express()
app.enable('trust proxy');
我希望我的生活除了電腦,還有生活
在Express.js,明明網址是https://xxxx.com 為甚麼req.protocol 卻總是回傳http 而不是https ?
可以試試加入這行:
app = express()
app.enable('trust proxy');