Monday, November 19, 2012

Now, I remember why I don't like Web development!!!

Since 2001, Java applets development and multiple Web browser, I hate to develop for Web browser... Today, I did lot of tests of Ajax calls, and I understand, one more time, why I continue to hate Web development...

I build a Web architecture to do Ajax calls on a REST server which doesn't support CORS. So I decide to implement an Apache Web server in reverse proxy with CORS headers.

Content of my httpd.conf: 
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods: "POST, GET, OPTIONS"
Header set Access-Control-Allow-Credentials "true"
SSLProxyEngine On
ProxyPass /api  https://10.223.43.21:8443/api
ProxyPassReverse  /api  https://10.223.43.21:8443/api

I'm doing a XHR call on my http server in proxy mode, it's work fine. But, I want to initiate the XHR call from a web page served via another web server.

In that case, I have strange behaviors... :( :( 
It works fine on IE:


I have a authentication error on Chrome:

And I have a cross-domain exception on Firefox:

 
Strange isn't it... I'm interested by any clues..

No comments:

Post a Comment