Always return the source ip even if no limits#184
Merged
silvin-lubecki merged 1 commit intodocker:mainfrom Sep 15, 2021
Merged
Conversation
Signed-off-by: Romain BELORGEY <romain.belorgey@gmail.com>
17fe07f to a4de1d9 Compare | second = "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" | ||
| first = "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | ||
| second = "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" | ||
| defaultValue = -1 |
Collaborator
There was a problem hiding this comment.
nit: move this as a const?
Contributor Author
There was a problem hiding this comment.
Looks not possible to have a const:
# github.com/docker/hub-tool/pkg/hub pkg/hub/ratelimiting.go:77:21: cannot take the address of defaultValue pkg/hub/ratelimiting.go:78:21: cannot take the address of defaultValue pkg/hub/ratelimiting.go:79:21: cannot take the address of defaultValue pkg/hub/ratelimiting.go:80:21: cannot take the address of defaultValue 😅 Is that fine to keep it like that ?
silvin-lubecki approved these changes Sep 15, 2021
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.
- What I did
If no limits, return the source ip and default values for the limits (
-1).