-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get data for [Discord] badges via OVH server proxies #4956
Conversation
|
services/discord/discord.service.js
Outdated
@@ -62,6 +67,11 @@ module.exports = class Discord extends BaseJsonService { | |||
} | |||
} | |||
|
|||
constructor(context, config) { | |||
super(context, config) | |||
this._runningOnHeroku = config.shieldsProductionHerokuHacks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we sync up these names? e.g. use shieldsProductionHerokuHacks for the instance var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, missed that one somehow. updating now
Thanks for addressing this, Caleb! |
👀 thank you for this! |
There's more details on the underlying issue in our Discord channels, but for a tl;dr..
Discord throttles calls to their API, and they'd whitelisted our 3 OVH servers previously to allow us to get the requisite data. When we routed img.shields.io traffic over to our Heroku environment we lost that whitelisting and our badge servers (on Heroku) hit the rate limits pretty quickly resulting in
invalid
for all our Discord badges.This is a temporary fix to get the Discord badges working by having our Heroku-based badge servers use the OVH servers as a proxy to get the Discord data.