Explanation:
I have a small web application running on apache server on a machine that uses javascript to do some XHR's. For a long time it worked with no problems, today all the XHR's stopped working but only on localhost, if you access it from outside it works perfectly.
Problem:
Using mozilla firefox, firebug warns:
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at
http://127.0.0.1:3581/datasnap/rest/TdssMloteamento/getLoteamento/true/
. This can be fixed by moving the resource to the same domain or enabling CORS."
But i'm on localhost acessing a local content that have XHR calls a local datasnap server on the same machine, resuming, locally it fails, and from web it works.
Comments:
I am acessing apache web page within url: http://127.0.0.1:3582/beeWebLoteamento/Principal.php
This is totally, really, weird for me, that just does not make sense, no-logic, why i get a cross-domain error if i'm acessing the same domain?
Objective:
I want to know what is happening and solve this problem to continue doing my XHR's locally and via the web (external) too.