English 中文(简体)
Access to 127.0.0.1 by default in Opera 10?
原标题:

Unlike other browsers (IE, FF, Chrome) Opera 10 doesn t allow websites to access content from localhost. Only when 127.0.0.1 is explicitly added to the trusted websites list in Opera does this work - all other browsers don t need this.

Any suggestions on how I can either programatically add this to the trusted sites list in Opera (unlikely that this is possible), or make Opera hit localhost using some alternate means like some type of cross-domain policy file on my website?

Thanks!

问题回答

Since this is a security feature it s not supposed to be possible to circumvent it from web content - otherwise it would be no point in having that feature in the first place. What s your use case?

File location in Windows: $USER_FOLDER/Application Data/Opera/Opera/

Ensure opera is closed, append, enjoy.

$ cat trusted_repositories.ini                                                                                      
Opera Preferences version 2.1
; Do not edit this file while Opera is running
; This file is stored in UTF-8 encoding

[whitelist]
http://widgets.opera.com
https://widgets.opera.com
http://unite.opera.com
https://unite.opera.com

I m assuming that you are installing some kind of software on your clients machines -- otherwise, how can you be certain that there is a webserver at 127.0.0.1? If so, @Autocracy s comment to the question applies: find where the "Trusted Sites" settings are stored, and modify it during the installation.

I am not sure what you are accessing on localhost/127.0.0.1?

Are request browser for a direct file system access? Or is your server running on localhost.

I just tested (on Linux), if your server is bound to 127.0.0.1 interface, opera is allowing the access.





相关问题
The proper way to handle popup closing

I m looking for close event for popup. I ve found one for XUL, but I need it for HTML. Popup has closed property. >>> var popup = open( http://example.com/ , popup , height=400,width=500 )...

Are cross-domain favicons a security risk?

I have a site of user-submitted news articles, and an idea I had for a feature was to grab the favicon on the target site to display along with the link. The methodology for grabbing the favicon ...

Javascript security / cross scripting on same server

Have some Javascript that I need to work via the following: ://localhost ://servername :/www.domainnamefortheserver.com When I run the script from http://servername with an IFRAME referencing the ...

AS3进入其他领域

我有一台AS3冲锋枪,用于搜索点和展示一些结果。 它在当地运作,但当帆船在服务器上时,它就能够进入角。 我曾尝试过安全......。

Error handling in getJSON calls

How can you handle errors in a getJSON call? Im trying to reference a cross-domain script service using jsonp, how do you register an error method?

Sending data using Jquery Iframes

I want to send large amounts of data to and from 2 domains (e.g. Cross Domains) I was told the best way to do this is to use IFrames. My question is... How do I go about doing this. Is this what ...

热门标签