Skip to content
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

Add geo-awareness into Availability API requests #10233

Open
3 tasks
mekarpeles opened this issue Dec 30, 2024 · 0 comments
Open
3 tasks

Add geo-awareness into Availability API requests #10233

mekarpeles opened this issue Dec 30, 2024 · 0 comments
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]

Comments

@mekarpeles
Copy link
Member

mekarpeles commented Dec 30, 2024

Proposal

Requests from Open Library (already attaching x-preferred-client-ip headers) will need to include x-preferred-client-useragent and x-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

@mekarpeles mekarpeles added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Module: Borrowing / Lending Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Affects: Operations Affects the IA DevOps folks Theme: Book Availability Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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]
Projects
None yet
Development

No branches or pull requests

1 participant