Add geo-awareness into Availability API requests #10233
Labels
Affects: Operations
Affects the IA DevOps folks
Lead: @mekarpeles
Issues overseen by Mek (Staff: Program Lead) [managed]
Module: Borrowing / Lending
Needs: Breakdown
This big issue needs a checklist or subissues to describe a breakdown of work. [managed]
Needs: Staff / Internal
Reviewed a PR but don't have merge powers? Use this.
Priority: 2
Important, as time permits. [managed]
Theme: Book Availability
Type: Feature Request
Issue describes a feature or enhancement we'd like to implement. [managed]
Milestone
Proposal
Requests from Open Library (already attaching
x-preferred-client-ip
headers) will need to includex-preferred-client-useragent
andx-preferred-client-jurisdiction
(two-character geoip location country code) along with the request.This issue can be resolved once:
Justification
Access to some items within the Internet Archive's purview are geographically restricted.
Currently, this only affects a few hundred Open Library records:
https://archive.org/advancedsearch.php?q=collection:geo_restricted%20AND%20openlibrary_edition:*&rows=10&output=json&fl=identifier,geo_restricted,collection&scope=all
Breakdown
Related files
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/core/lending.py#L378-L400
Relates to https://webarchive.jira.com/browse/WEBDEV-7187
Stakeholders
The text was updated successfully, but these errors were encountered: