-
Notifications
You must be signed in to change notification settings - Fork 14
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
CORS not working #50
Comments
Indeed! Thanks for reporting. I don't have any intention of adding JSONP support. The fatcat API itself (api.fatcat.wiki) should work with CORS, but of course doesn't include the full search stuff. Please note that that we will be changing the domain at some point, probably to scholar.archive.org, and the scholar-qa domain will redirect or be a staging area, which could break CORS again. |
Also, if you are planning to do an integration, we will probably make the scholar ("full-text") content available through https://search.fatcat.wiki as a separate index. This endpoint exposes the raw elasticsearch API (behind a proxy, es-public-proxy), which might be easier to develop with. In both cases we aren't yet offering any long-term API stability guarantees, as this is still an "alpha" service. |
Ok, excellent. I will plan on using the raw Elasticsearch API. Thanks for all the hard work! |
I think the CORS issue is fixed now, for a minimal set of headers, GET requests, and any Origin. At least, testing naively with:
Seems to work as expected, I didn't test with a real cross-domain browser request. I also catch the case of an API call with no |
Great! I tweeted about the integration here. Such a cool project! Nitpick issue I saw: The returned results also highlights ("_highlights") the search-language. I think this is not really needed / useful, but may just be a technical issue on the backend. |
Yes, the highlights are included (undocumented) because I am basically passing back exactly the query results that would be used in the web interface. That could be controlled for API calls via a query parameter though. If you are interested in that, could you create a new issue? |
Done: #54 |
I think CORS is not configured properly to use the Fatcat API, I get the following error (and JSONP is also not working for me).
Could you enable CORS on the API server? See: https://ubiq.co/tech-blog/enable-cors-apache-web-server/
Thanks in advance!
The text was updated successfully, but these errors were encountered: