feat: implement whitelist for self-hosted instances (#3939)
* whitelist for username based endpoints * added gist whitelist * review * fix --------- Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
- [On Vercel](#on-vercel)
|
||||
- [:film\_projector: Check Out Step By Step Video Tutorial By @codeSTACKr](#film_projector-check-out-step-by-step-video-tutorial-by-codestackr)
|
||||
- [On other platforms](#on-other-platforms)
|
||||
- [Disable rate limit protections](#disable-rate-limit-protections)
|
||||
- [Available environment variables](#available-environment-variables)
|
||||
- [Keep your fork up to date](#keep-your-fork-up-to-date)
|
||||
- [:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
|
||||
</details>
|
||||
@@ -797,11 +797,13 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
|
||||
5. You're done 🎉
|
||||
</details>
|
||||
|
||||
## Disable rate limit protections
|
||||
## Available environment variables
|
||||
|
||||
GitHub Readme Stats contains several Vercel environment variables that can be used to remove the rate limit protections:
|
||||
GitHub Readme Stats provides several environment variables that can be used to customize the behavior of your self-hosted instance. These include:
|
||||
|
||||
* `CACHE_SECONDS`: This environment variable takes precedence over our cache minimum and maximum values and can circumvent these values for self-hosted Vercel instances.
|
||||
* `CACHE_SECONDS`: This takes precedence over our cache minimum and maximum values and can circumvent these values for self-hosted instances.
|
||||
* `WHITELIST`: A comma-separated list of GitHub usernames that are allowed to access your instance. If this variable is not set, all usernames are allowed.
|
||||
* `GIST_WHITELIST`: A comma-separated list of GitHub gist IDs that are allowed to be accessed on your instance. If this variable is not set, all gist IDs are allowed.
|
||||
|
||||
See [the Vercel documentation](https://vercel.com/docs/concepts/projects/environment-variables) on adding these environment variables to your Vercel instance.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user