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
Looking up files by sha256 #9
Comments
Yup, this is exactly what we need and would be great to have indeed. As discussed in the referenced issue for Phast, we'll use the hashes of files on a user's website to find the corresponding files on jsDelivr. If there's a match, we rewrite the reference so that the file is loaded from the CDN. If we can do this search without crawling your (or someone else's) API, that would be epic. I'm looking forward to your update on this. |
One thing is that a single hash might match many files. In that case it probably makes sense to use the oldest (earliest) available file on your CDN, so that the URLs remain stable. |
This is now available at @apeschar it'll take a few more hours until our DB has all the hashes, so some requests will return 404 until then. Once the DB is complete, you should be able to find any file, which was previously accessed via our CDN. When there are multiple files with the same hash, we return the one which was accessed first. I'm going to keep this undocumented for a while so that you can test it. |
Cool. Seems to work well. It'll take a while until we actually get around to implementing this in our project. I'll keep you posted. |
See kiboit/phast#57.
The text was updated successfully, but these errors were encountered: