]
Vladimir Dzhuvinov commented on ISPN-6864:
------------------------------------------
I suppose CORS support could be retrofitted by adding a filter to handle the
Access-Control-* headers, however I cannot suggest how to approach this with WildFly and
the way the Infinispan server is packaged.
I have implemented a servlet filter for CORS which may be configured from web.xml, an
properties file or from system properties.
Add support for CORS headers to REST server
-------------------------------------------
Key: ISPN-6864
URL:
https://issues.jboss.org/browse/ISPN-6864
Project: Infinispan
Issue Type: Feature Request
Components: Remote Protocols
Reporter: James Falkner
Priority: Minor
Currently it is not possible to enable browser-based applications to call infinispan REST
APIs due to the lack of [
CORS|https://en.wikipedia.org/wiki/Cross-origin_resource_sharing]
headers in the responses, and there is no way to alter the underlying web server to
include these.
This request asks that CORS headers be optionally returned in REST requests, and be
configurable by admins. Specifically, the following headers:
* Access-Control-Allow-Origin
* Access-Control-Allow-Credentials
* Access-Control-Expose-Headers
* Access-Control-Max-Age
* Access-Control-Allow-Methods
* Access-Control-Allow-Headers
This would enable browser-based apps to function when working across domains.