我如何獲得無魔術和後端的previouse url?Sails.js - 從請求獲取previouse網址
現在我得到它通過政策:
module.exports = function(req, res, next) {
if (!req.session.previouseUrls) {
req.session.previouseUrls = [];
}
req.session.previouseUrl = req.session.currentUrl || "/";
req.session.currentUrl = req.url;
req.session.previouseUrls.push(req.session.previouseUrl);
next();
};
但它是不舒服。我可以從後端更簡單地得到previouse Url嗎?
Previous url?客戶端在當前網址之前擊中的網址是?你爲什麼需要得到它? – Haven