CORS not set, can't access JSON in Chrome

Issue #91 on hold
Dragon Dave McKee created an issue

No description provided.

Comments (10)

  1. ian_hopkinson

    The Simple API will return JSONP if the parameter &callback=mycallback is appended to the query, I believe this is the standard way of addressing this issue.

    I don't know why the parameter &_=1406801162041 is appended to the query, I don't think it matters because I believe the Simple API will silently ignore unrecognised parameters.

  2. David Jones

    As per the error message, we need to add an Access-Control-Allow-Origin header.

    For the JSON API on the platform we add one like this:

    Access-Control-Allow-Origin: *
    

    This is standard practice for APIs that do not require a login (most of them).

  3. Steven Maude

    I can't reproduce on Firefox or Chromium, so I'm going to assume that the header change fixed it. If anyone else has this problem, we'll reopen the issue.

  4. Log in to comment