mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-29 15:51:35 +00:00
Notify users if they were blocked due to proxy
This commit is contained in:
parent
f0a28d485f
commit
d4f9af44b0
3 changed files with 21 additions and 2 deletions
|
|
@ -159,7 +159,8 @@ module.exports = [
|
|||
} else if (error === constants.symbols.extractor_results.AGE_RESTRICTED) {
|
||||
return render(403, "pug/age_gated.pug", {settings})
|
||||
} else if (error === constants.symbols.QUOTA_REACHED) {
|
||||
return render(429, "pug/quota_reached.pug")
|
||||
const isProxyNetwork = quota.isProxyNetwork(req)
|
||||
return render(429, "pug/quota_reached.pug", {isProxyNetwork})
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
|
|
@ -302,7 +303,8 @@ module.exports = [
|
|||
} else if (error === constants.symbols.RATE_LIMITED) {
|
||||
return render(503, "pug/blocked_graphql.pug")
|
||||
} else if (error === constants.symbols.QUOTA_REACHED) {
|
||||
return render(429, "pug/quota_reached.pug")
|
||||
const isProxyNetwork = quota.isProxyNetwork(req)
|
||||
return render(429, "pug/quota_reached.pug", {isProxyNetwork})
|
||||
} else {
|
||||
throw error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue