Authored by 郭成尧

cors

... ... @@ -380,12 +380,6 @@ const listNew = (req, res, next) => {
* SEO 友好的品类落地页异步获取商品数据
*/
const getCategoryGoods = (req, res, next) => {
let allowOrigin = _.get(req, 'headers.origin', null) ?
req.headers.origin : req.protocol + '://' + req.headers.host;
res.setHeader('Access-Control-Allow-Origin', allowOrigin);
res.setHeader('Access-Control-Allow-Credentials', 'true');
let params = _.assign({}, req.query);
let uid = req.user.uid || 0;
... ...