Skip to content

Disable rate_limit check on GitHub Enterprise completely #273

@djdefi

Description

@djdefi

GitHub Enterprise prior to 2.10 does not have rate limiting, requests to https://hostname/api/v3/rate_limit will return a 404 Not Found status code. in 2.10+ rate limiting can be enabled, but is disabled by default.

Based on the change in #78 there is a check for rate_limit, and then the rate limit is set to an arbitrary high number. On very busy systems this results in tens of thousands of requests per hour to the GitHub Enterprise appliance. Although returning a 404 is a relatively simple operation, there are other things such as logging that are impacted by the volume of requests.

A better method would be to look for /api/v3/ within the configured API URL, and then simply skip the rate limit check altogether. /api/v3/ is unique to GitHub Enterprise, so this will not have any impact on the GitHub.com rate_limit endpoint of https://api.github.com/rate_limit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions