質問

I have an application running on WAS 8.0.0.3 and I am trying to access that application from another machine using an ajax call (cross domain). The preflight request (OPTIONS) is failing because origin(other machine) is not allowed by Access-Control-Allow-Origin which means WAS is not configured to allow cross domain requests. I searched but could not find any configuration which can be made on WAS to support CORS. The same thing works fine on Apache tomcat by modifying tomcats config but for WAS could not get any pointer. Any idea would be appreciable.

役に立ちましたか?

解決

After doing analysis, it appeared that WAS on its own does not provide any provision to enable CORS in its configuration. To solve this problem, added configuration for "Acess-Control-Allow-Origin" on web server (IHS) which did the trick. So looks like web server should handle configuration required for cross domain requests in case of certain application servers like WAS.

他のヒント

If you have an Spring Application you can use @CrossOrigin to do this.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top