diff --git a/src/site/api/feed.js b/src/site/api/feed.js index 89f1902..0ec764c 100644 --- a/src/site/api/feed.js +++ b/src/site/api/feed.js @@ -71,7 +71,7 @@ module.exports = [ message: "This user doesn't exist.", withInstancesLink: false }) - } else if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED) { + } else if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.RATE_LIMITED || error === constants.symbols.INSTAGRAM_BLOCK_TYPE_DECEMBER) { return { statusCode: 503, contentType: "text/html", @@ -79,10 +79,8 @@ module.exports = [ "Cache-Control": `public, max-age=${userRequestCache.getTtl("user/"+fill[0], 1000)}`, "Retry-After": userRequestCache.getTtl("user/"+fill[0], 1000) }, - content: pugCache.get("pug/blocked.pug").web({ + content: pugCache.get("pug/blocked_december.pug").web({ website_origin: constants.website_origin, - username: fill[0], - expiresMinutes: userRequestCache.getTtl("user/"+fill[0], 1000*60), getStaticURL }) } diff --git a/src/site/api/routes.js b/src/site/api/routes.js index 8fb6dd0..b7fdda4 100644 --- a/src/site/api/routes.js +++ b/src/site/api/routes.js @@ -138,23 +138,7 @@ module.exports = [ withInstancesLink: false, settings }) - } else if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN) { - return { - statusCode: 503, - contentType: "text/html", - headers: { - "Retry-After": userRequestCache.getTtl("user/"+username, 1000) - }, - content: pugCache.get("pug/blocked.pug").web({ - website_origin: constants.website_origin, - username, - expiresMinutes: userRequestCache.getTtl("user/"+username, 1000*60), - getStaticURL, - settings, - lang - }) - } - } else if (error === constants.symbols.INSTAGRAM_BLOCK_TYPE_DECEMBER) { + } else if (error === constants.symbols.INSTAGRAM_DEMANDS_LOGIN || error === constants.symbols.INSTAGRAM_BLOCK_TYPE_DECEMBER) { return render(503, "pug/blocked_december.pug") } else if (error === constants.symbols.RATE_LIMITED) { return render(503, "pug/blocked_graphql.pug")