OpenShift: Access-Control-Allow-Origin set by server for GET request disappears on way back
cors, openshift
Solution
http requests to gears on OpenShift Online go through a reverse proxy (apache), so it is possible that header is being removed when it comes back through the proxy.
Problem
I've run into a strange behavior on OpenShift. I run a REST application on OpenShift which have CORS Filter enabled to set Access-Control-Allow-Origin header. This works fine on local jboss for all requests and on OpenShift for all requests but GET. For some reason when GET request is issued following happens. Jbossas receives a request and application sets the Access-Control-Allow-Origin header (this was verified with remote debugging). But the response I'm receiving on the caller side contains no header. Something along the way back removes the header. What can be the reason or how to fix it?