Express URL跳轉(重定向)的實現

Express是一個基於Node.js實現的Web框架,其響應HTTP請求的response對象中有兩個用於URL跳轉方法res.location()和res.redirect(),使用它們可以實現URL的301或302重定向。 res.location(path) res.location(path) 下面列舉了幾種,設置http響應頭Location的方法 res.location('/foo
相關文章
相關標籤/搜索