Without additional information, this doesn't really make sense. The
point of CORS is to allow trusted domains to make cross-domain requests
to a given domain. You're essentially asking us to open up access from a
domain you don't control, which is a strange thing to ask for.
I assume you're trying to use a userscript on www.zotero.org? If that's
the case, you can make requests to www.zotero.org/api, which is
currently equivalent to api.zotero.org and what the website uses to
build library pages. We'll probably replace www.zotero.org/api with CORS
on api.zotero.org at some point, so there's no guarantee that /api will
work long-term, but we have no immediate plans to discontinue it.
Yes, that would qualify as a userscript. It doesn't really matter here,
but my point was simply that what you asked for didn't make sense
without your specifying that you were using a local script.
> I have no idea of why cross-domain requests to api.zotero.org should
> be forbidden from any domain.
In the near future we'll be rolling out an authentication mechanism for
the API based on zotero.org session cookies. Without the same-origin
policy, an XSS vulnerability on another website could allow an attacker
to read or write to someone's Zotero library.
> I guess I could call api.zotero.org from a second server, or?
Yes.
> I guess www.zotero.org/api will work in my case so thanks for the tip,
> Dan. :-)
Great.
Oh, I see. Doesn't CORS distinguish between reading and writing?
>> I guess www.zotero.org/api will work in my case so thanks for the tip,
>> Dan. :-)
>
>
> Great.
It worked. :-)