-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support mirror CDN for package and shared profile downloads #960
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #960 +/- ##
==========================================
+ Coverage 92.93% 92.94% +0.01%
==========================================
Files 286 286
Lines 8488 8502 +14
Branches 788 790 +2
==========================================
+ Hits 7888 7902 +14
Misses 496 496
Partials 104 104 ☔ View full report in Codecov by Sentry. |
These shouldn't be tied to the mirror storage definitions at all, as those might have nothing to do with public-facing CDN routing. If we want to validate the domains (which is not a bad idea), add a new setting for it and go through that list instead. |
Reimplemented as:
|
c66bc49
to
ac3779f
Compare
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.
Few questions but looks good overall 👍
Feel free to merge as is or adjust if you think it makes sense to
API calls can indicate that a mirror CDN is preferred by including a query parameter in the request. The feature will be supported by the API endpoints that provide download URLs for packages and shared mod manager profiles. The backend will return URL to the preferred CDN only if the CDN is allowlisted in the config. This is a plain string replacement operation and the backend doesn't validate the URL it's about to return in any way. This is intended to solve the small but growing number of incidents where users for some reason can't access Thunderstore's main CDN. Refs TS-2003
ac3779f
to
6e1659b
Compare
API calls can indicate that mirror CDN is preferred by including a query paramater flag in the request. Currently this is supported by the API endpoints that provide download URLs for packages and shared mod manager profiles.
If the backend receives the query parameter flag and is configured to use MirroredS3Storage, it will try to return URLs that point to the first mirror CDN.
This is intended to solve the small but growing number of incidents where users for some reason can't access Thunderstore's main CDN.
Refs TS-2003