Remove auth restriction on RSS, add rate limiting (1 per 10 seconds.)#1797
Open
MikeNeilson wants to merge 4 commits into
Open
Remove auth restriction on RSS, add rate limiting (1 per 10 seconds.)#1797MikeNeilson wants to merge 4 commits into
MikeNeilson wants to merge 4 commits into
Conversation
980c4d4 to
011321f
Compare
krowvin
requested changes
Jun 23, 2026
krowvin
left a comment
Collaborator
There was a problem hiding this comment.
I'm not sure on a few things, wanted to clarify first
adamkorynta
reviewed
Jun 23, 2026
| MessageDao dao = new MessageDao(dsl); | ||
| RssFeed feed = dao.retrieveFeed(cursor, pageSize, office, name, since, newLinkTemplate(ctx)); | ||
| String result = Formats.format(contentType, feed); | ||
| ctx.header("Retry-After", "10"); |
Collaborator
There was a problem hiding this comment.
I think we would want Retry-After to be set if the rate limit is hit instead of just on success. We could also set the cache header to something similar to avoid burst.
Contributor
Author
There was a problem hiding this comment.
Agreed, I just couldn't think of a clean way... other than move that exception handling into here. which, actually fairly clean reasonable exception, will go do that.
adamkorynta
previously approved these changes
Jun 23, 2026
adamkorynta
reviewed
Jun 23, 2026
| // and we don't want to deal with trying to distinguish in ApiServlet. For the time being this logic will | ||
| // remain here. | ||
| if (ex.getStatus() == 429) { | ||
| var cdaError = new CdaError("Too many requests. Limit queue requests to no more than every 10 seconds."); |
Collaborator
There was a problem hiding this comment.
This should probably go in the OpenAPI description
krowvin
previously approved these changes
Jun 23, 2026
54f97d3 to
96187f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove auth restriction from RSS feed, but add rate limiting to the expected usage (e.g. 1 request per client every ten seconds)
Related Issue
N/A
Validation
Manually, queried a bunch until it gave me the 429.
existing integration test triggered the 429 and was modified to use the provided Retry-After value.
Checklist