I read on mozilla :
A page may change its own origin with some limitations. A script can set the value of document.domain to its current domain or a superdomain of its current domain. If it sets it to a superdomain of its current domain, the shorter domain is used for subsequent origin checks. For example, assume a script in the document at http://store.company.com/dir/other.html executes the following statement:
document.domain = "company.com";
After that statement executes, the page can pass the origin check with http://company.com/dir/page.html (assuming http://company.com/dir/page.html sets its document.domain to "company.com" to indicate that it wishes to allow that - see document.domain for more). However, company.com could not set document.domain to othercompany.com since that is not a superdomain of company.com.
and it means to change the origin for next calls on different domains as it says here:
Does setting document.domain work in all (most) browsers?
and therefore I try (exactly as the example, on Firefox), but still the cors points to origin before change, here my test :
are we missing something??

Aucun commentaire:
Enregistrer un commentaire