Parts
I am developing against two Pylons servers and testing locally. One server is located on port 5000 and is the called server. The other is on port 7000. The latter creates a cookie that indicates the same domain as the previous server used. Essentially, the first server uses the credentials provided by the second server to impersonate the user.
The first server expects to find an authentication token (cookie, really) in its response.environ at runtime. When I authenticate the server on port 7000 and the browser for the service on port 5000, the last server uses the cookie created by the first and the application works.
The fly in Mazen is that the first server creates an HTML5 application that uses the ajax call for the second server, and I cannot force the cookie to be included in the ajax call. I believe that Chrome (the browser we use / require to support HTML5) refuses to send cookies for cross-arguments: switching from foo.net:7000to foo.net:5000is considered a cross-domain.
Oh, and ajax call through jQuery.
Question
Is there a way to make an ajax call from an HTML5 application created on a port in the same domain, to a server in the same domain, but with a different port?
What I tried or chose from my hands
, script, javascript, HTML JavaScript. , , .
, Access-Control-Allow- * , , .
jQuery ajax. .
.
.