-
Notifications
You must be signed in to change notification settings - Fork 2
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 support on servers we depend on #239
Comments
|
rybesh
changed the title
ORCID and Crossref support CORS now
CORS support on servers we depend on
May 31, 2020
Hello. Perhaps try this test for Or with
|
Thanks @gbilder! I've updated the list to reflect that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In modern web browsers, making requests from JavaScript (JS) to URLs with domains that differ from the one where the JavaScript originated is forbidden by default.
Servers that wish to allow JS requests from other domains can indicate this by setting an
Access-Control-Allow-Origin
header, e.g.Access-Control-Allow-Origin: *
to allow JS requests from any domain.
Since JS applications working with linked data URLs need to be able to make GET requests to those URLs, in order to discover the resources to which they point, then it makes sense for both URL resolvers and linked data servers to set this header.
In order to ensure that JS on arbitrary domains can only read and not write to URL resolvers and linked data servers, it may also make sense to only allow GET requests by setting an
Access-Control-Allow-Methods
header, e.g.:Access-Control-Allow-Methods: GET
Since a
302 Redirect
(or other redirect) response is useless without theLocation
header, and browsers by default do not expose the Location header to JS, it also makes sense for URL resolvers to expose that header by setting anAccess-Control-Expose-Headers
header, e.g.:Access-Control-Expose-Headers: Location
By setting these headers, URLs of linked data publishers and resolvers become usable from JS running in browsers, without compromising the security of their servers.
Unfortunately, more than six years after Cross-Origin Resource Sharing (CORS) became a W3C Recommendation, support for these CORS headers among major scholarly data publishers and resolvers is still poor.
The text was updated successfully, but these errors were encountered: