2

I am using jboss-as-7.1.1.Final I want to enable CORS on JBoss server as the request is coming form Extjs/javascript which is deployed on one domain (i.e abc.xxx, which is jboss server) Ajax request is send to second domain (i.e xyz.xxx, which is jboss server) i am using ajax as i need to pass custom headers to the URL and i facing issue where the error saying

"XMLHttpRequest cannot load xyz.xxx/XXX. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'abc.xxx' is therefore not allowed access. "

I have seen in one of the article where it talks about JBoss and Cors http://hpehl.info/independent-jboss-admin-console.html

I downloaded the file org.jboss.as.domain.http.server.DomainApiHandler to be changed on the server side that is been talked about "For the JBoss AS this implies changes to the class org.jboss.as.domain.http.server.DomainApiHandler. This class handles HTTP requests to the management API. The modified version accepts preflighted OPTIONS requests and sets the relevant response headers."

I am not sure where can i set the OPTIONS on the server in which config file as it says "It is up to the server to decide which origins are allowed"

nilesh
  • 315
  • 2
  • 11
  • 24

0 Answers0