Skip to content

Support CORS on JSON API #333

@oberstet

Description

@oberstet

Say I want to show project stats like monthly downloads on the project page. Fetching this from client side JavaScript allows me to retain a completely static project page (can be hosted on a CDN).

However, the JSON API does not set Access-Control-Allow-Origin header - no CORS support.

Test:
https://github.com/oberstet/scratchbox/blob/master/js/badges/pypi.html

For comparison, this is what GitHub does with it's API:
https://github.com/oberstet/scratchbox/blob/master/js/badges/github.html

If above would work, that makes #330 void (for me) - if the API doesn't get rate limited or such ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions