Skip to content

Allow CORS for objects.inv, or expose inventory in API? #8769

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

Closed
astrojuanlu opened this issue Dec 15, 2021 · 4 comments · Fixed by #10737
Closed

Allow CORS for objects.inv, or expose inventory in API? #8769

astrojuanlu opened this issue Dec 15, 2021 · 4 comments · Fixed by #10737
Labels
Needed: design decision A core team decision is required

Comments

@astrojuanlu
Copy link
Contributor

I was playing with a proof of concept of a browser-based intersphinx viewer, but requests to GET objects.inv get blocked because of CORS.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://docs.readthedocs.io/en/latest/objects.inv. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200

I wonder if CORS access could be allowed for such files?

Alternatively, since the various APIs have CORS headers in place, I wonder if it would be possible to add an endpoint that would list the inventory of a project as a byte stream?

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Mar 2, 2022
@humitos
Copy link
Member

humitos commented Mar 2, 2022

We did change some CORS policies lately, but it seems this is still an issue.

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Mar 2, 2022
@humitos humitos added Needed: design decision A core team decision is required Status: stale Issue will be considered inactive soon labels Mar 2, 2022
@stale stale bot removed the Status: stale Issue will be considered inactive soon label Mar 2, 2022
@humitos
Copy link
Member

humitos commented Sep 19, 2023

I'm reopening it because we changed our logic to only add CORS headers on *.org.readthedocs.build domain. See #10751

@humitos humitos reopened this Sep 19, 2023
@stsewd
Copy link
Member

stsewd commented Jan 25, 2024

We allow cross site requests for all documentation content now. See https://docs.readthedocs.io/en/stable/security-implications.html#cross-origin-requests.

@stsewd stsewd closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants