-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Update phishing config request logic #244
Conversation
This change updates the `PhishingController` config request logic to: 1. Use the official GitHub API for repo contents (see #219) 2. Handle 403 responses, as the GH API will rate limit with that status code Note that the current query interval, 180000 ms, will be fewer than 60 requests per hour: > For unauthenticated requests, the rate limit allows for up to 60 requests > per hour. Unauthenticated requests are associated with the originating IP > address, and not the user making requests. And, per the docs, 304 responses don't count towards the rate limit: > Making a conditional request and receiving a 304 response does not count > against your Rate Limit, so we encourage you to use it whenever possible. See also: - [GitHub REST API v3 - Media Types](https://developer.github.com/v3/media/) - [GitHub REST API v3 - Rate limiting](https://developer.github.com/v3/#rate-limiting) - [GitHub REST API v3 - Conditional requests](https://developer.github.com/v3/#conditional-requests)
Though this might not apply to unauthenticated requests:
Running this sees the |
I've tested this with the extension and it works as expected. |
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.
LGTM, thanks!
This change updates the `PhishingController` config request logic to: 1. Use the official GitHub API for repo contents (see #219) 2. Handle 403 responses, as the GH API will rate limit with that status code Note that the current query interval, 180000 ms, will be fewer than 60 requests per hour: > For unauthenticated requests, the rate limit allows for up to 60 requests > per hour. Unauthenticated requests are associated with the originating IP > address, and not the user making requests. And, per the docs, 304 responses don't count towards the rate limit: > Making a conditional request and receiving a 304 response does not count > against your Rate Limit, so we encourage you to use it whenever possible. See also: - [GitHub REST API v3 - Media Types](https://developer.github.com/v3/media/) - [GitHub REST API v3 - Rate limiting](https://developer.github.com/v3/#rate-limiting) - [GitHub REST API v3 - Conditional requests](https://developer.github.com/v3/#conditional-requests)
This change updates the `PhishingController` config request logic to: 1. Use the official GitHub API for repo contents (see #219) 2. Handle 403 responses, as the GH API will rate limit with that status code Note that the current query interval, 180000 ms, will be fewer than 60 requests per hour: > For unauthenticated requests, the rate limit allows for up to 60 requests > per hour. Unauthenticated requests are associated with the originating IP > address, and not the user making requests. And, per the docs, 304 responses don't count towards the rate limit: > Making a conditional request and receiving a 304 response does not count > against your Rate Limit, so we encourage you to use it whenever possible. See also: - [GitHub REST API v3 - Media Types](https://developer.github.com/v3/media/) - [GitHub REST API v3 - Rate limiting](https://developer.github.com/v3/#rate-limiting) - [GitHub REST API v3 - Conditional requests](https://developer.github.com/v3/#conditional-requests)
This change updates the
PhishingController
config request logic to:Note that the current query interval, 180000 ms, will be fewer than 60 requests per hour:
And, per the docs, 304 responses don't count towards the rate limit:
See also: