[annotator-dev] (no subject)

Ed Summers ehs at pobox.com
Sun Apr 28 11:23:56 UTC 2013


newbie question #2

When I open the dev.html document in my browser with an
annotatore-store instance running on port 5000 I get an error:

  XMLHttpRequest cannot load http://localhost:5000/api/token. Origin
http://localhost:8080 is not allowed by Access-Control-Allow-Origin.

I took a look in my annotator-store log and saw, that the request is a 404:

  INFO:werkzeug:127.0.0.1 - - [28/Apr/2013 06:55:34] "GET /api/token
HTTP/1.1" 404

... which unlike 200 OK requests doesn't get the CORS headers, and so
shows up as an cross-origin error:

  curl -I http://localhost:5000/api/token
  HTTP/1.0 404 NOT FOUND
  Content-Type: text/html
  Content-Length: 238
  Server: Werkzeug/0.8.3 Python/2.7.2
  Date: Sun, 28 Apr 2013 11:13:44 GMT

Is it the case that annotator-store isn't designed to be run by
itself, and needs to be used in the context of an other app that
handles authentication, like hypothesis/h or okfn/annotateit?

//Ed




More information about the annotator-dev mailing list