...
|
...
|
@@ -3,14 +3,12 @@ |
|
|
const urlEncode = require('urlencode');
|
|
|
const _ = require('lodash');
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const allowSubDomain = ['list', 'search'];
|
|
|
|
|
|
|
|
|
module.exports = (req, res, next) => {
|
|
|
let query = req.query.query;
|
|
|
let query = _.trim(req.query.query);
|
|
|
let subDomain = req.subdomains[0];
|
|
|
|
|
|
if (query && _.includes(allowSubDomain, subDomain)) {
|
|
|
if (query) {
|
|
|
try {
|
|
|
decodeURIComponent(query);
|
|
|
return next();
|
...
|
...
|
|