-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORS difference from Beaker #10
Comments
Beaker uses a permissive CORS on dat responses right now. The RSS reader was an example of why I felt that was important. |
Is that by design because Dat origins are assumed to be public and hold no secrets? Is this something you expect to remain unchanged? Should it be defined as a standard for Dat resources? I thought about extending dat.json to include a What about using a special file as a control mechanism? So for example Is that something that could work for Gecko, @sammacbeth? A more generic solution could be using a |
At the moment, the assumption is that if you have the Dat's URL, you're able to read it. I expect us to build out a more sophisticated ACL system but I want to make sure we're thinking it through hollistically. For instance, it doesn't make a lot of sense to introduce CORS controls if they don't also apply to the |
We inherit the CORS policy from Firefox, but this is configurable by the protocol handler AFAIK. The I tweaked these flags for this extension to allow third-party origins to load in dat pages: sammacbeth/libdweb@fd8c687 |
We don't actually disable CORS. We just respond with a |
I think I'm seeing the same issue. I'm running the following dat://795f83fa1356cd7d00e5cfe8f1a93f32c55127684c6fc4cb8ff89a32e000016b That is a frontend to some contracts running on the Ethereum Rinkeby Test Network, so it relies on MetaMask to inject a web3.js instance that points to Rinkeby. Unfortunately, no matter what I do with MetaMask, my app' thinks it's on the Ropsten network, and I get these errors:
Meanwhile, is there anything I can do to get Clickz Latest working for |
@glowkeeper This is the same as the browser's standard cross origin policy. You can send the i.e. on your server at |
Forgive my ignorance, but I'm pinning that |
The JS in the dat you linked is trying to content a webserver at |
That must be the web3.js library trying to open a default instance to access a private (test) blockchain, such as that provided by Ganache. In other words, it's not a webserver and it's not code or service under my control. Sounds like I might be, er, Also sounds like I need to speak to the good people at web3.js since it appears their library's default behaviour is breaking my ps. what's puzzling is that same |
ps. I should mention that web3.js gets injected by MetaMask...
|
Aha! This is indeed a problem with web3.js, and it'll be fixed with the imminent release of v1.2.2... |
Beaker supports loading
dat://site2
from the context ofdat://site1
.Cliqz blocks these requests with an
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at dat://site2/example.file (Reason: CORS request not http).
error message.So is this a security issue in Beaker? or a deliberate change from HTTP? or is it just an issue with dat-webext and Cliqz?
Demo app:
dat://rss-reader-pfrazee.hashbase.io/
Thoughts, @pfrazee?
The text was updated successfully, but these errors were encountered: