fix: /nowcoder/discuss remove query part of url (#4950)

This commit is contained in:
notofoe
2020-06-10 11:45:40 +08:00
committed by GitHub
parent 4548bffde7
commit 47922c6c2c

View File

@@ -29,7 +29,7 @@ module.exports = async (ctx) => {
const out = await Promise.all(
list.map(async (info) => {
const title = info.title || 'tzgg';
const itemUrl = url.resolve(host, info.link);
const itemUrl = url.resolve(host, info.link).replace(new RegExp('^(.*)[?](.*)$'), '$1');
const cache = await ctx.cache.get(itemUrl);
if (cache) {