简体   繁体   中英

Firefox 5 Cross-Domain

Since Firefox 5 was recently released I wanted to test if a web page I am working on would work on Firefox 5. However, my webpage which works fine in Firefox 4 is having problems in Firefox 5 with cross-domain requests. Does anyone know what changes in Firefox 5 could have changed this behavior? I am using the following code to allow cross domain requests in Firefox 5 (Again this code works fine in Firefox 4)

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead UniversalBrowserWrite");

IIRC Mozilla was planning to remove the enablePrivilege function for a while. Looks like they started for real with Firefox 5. See for example https://bugzilla.mozilla.org/show_bug.cgi?id=667312 for some discussion and some more links.

Check this: http://www.w3.org/TR/cors/

it says: The Access-Control-Allow-Origin header indicates whether a resource can be shared based by returning the value of the Origin request header in the response.

by doing this, you avoid security risks, and it should start working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM