I embbeding my module, an asp.net project, in a \"portal\", the portal generate an iframe to my url, i know its a shit but i dont made it.
To avoid session in main \"portal\
What you are trying to do is a clear violation of the same origin policy for JavaScript. A good solution is that the portal owner can set this http header element for the page (and only the page) that you want to fetch with an XHR.
Access-Control-Allow-Origin: http://foo.example
source: http access control