mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-11-22 08:07:30 +00:00
Remove unblocker
It does not work. It was created for an older era when the user page was most heavily restricted, and graphql timeline was free. So the visitor would look up the username-userID relationship on the instance's behalf, and submit that for the instance to check, and then that profile would be unblocked forever because the user page is not needed after that point. Now, the user page is free, and graphql timeline can be impossible. (Still haven't worked that out yet.) So the unblocker would only be fetching information that the instance could already get. Even if the instance was somehow blocked from the user page, the unblocker would not help, since it only fetches the username-userID relationship for use with graphql timeline, and graphql timeline is currently blocked on the instance too. Keeping this in Bibliogram is misleading to visitors and the backing code is now useless. The correct way to view profiles is to run your own Bibliogram.
This commit is contained in:
parent
8928ab1edf
commit
d576b3ef76
@ -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
|
||||
})
|
||||
}
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user