-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Gateway should allow CORS #934
Comments
Yeah. We'll eventually need to use suborigins: www.chromium.org/developers/design-documents/per-page-suborigins |
@dylanPowers try out https://github.com/jbenet/go-ipfs/tree/fix/gateway-cors let me know if that solves the issue for you |
mmm not sure what security implications are at play here. @mappum your perspective? |
My 3 cents: HTTP Gateway (8080 by default) is supposed to be read-only, it would not hurt to limit allowed HTTP methods via
( This would enable JavaScript from other domains to access immutable ( Good thing is that WebUI runs on a separate port (5001 by default), |
@lidel that makes good sense. |
Agreed. @lidel do you know Go? (Need some help with gateway things) — On Sun, Mar 29, 2015 at 10:54 AM, Jeromy Johnson [email protected]
|
Sadly no, I have not touched Go before. This is a good motivation to learn, but I'd have to do some serious reading before I feel comfortable making any contribution to go-ipfs. |
it's a great language! https://tour.golang.org On Wed, Apr 1, 2015 at 12:34 PM, Marcin Rataj [email protected]
|
👍 |
We have CORS working now :) Let me us know if you encounter any remaining issues |
In certain situations browsers execute HTTP
Produces:
Am I missing some configuration or do we need to reopen this ticket? |
More precisely, in certain situation browser does not execute |
Also read-only API is missing CORS, it makes impossible to use read only API from browser/XHR. Is there reason why they are filtered out from read-only API? |
@Kubuxu i do not recall. this may be an error now, as other parts have shifted. what would be nice is a short doc describing how we should handle all the CORS things, and then make sure the implementation does that. |
@Kubuxu all this will get smaller once the gateway is split out into its own repo. |
Denying cross origin resource sharing (CORS) over IPFS doesn't make much sense. All requests should be allowed.
Adding "Access-Control-Allow-Origin: *" to the HTTP headers will enable that.
Use cases:
The text was updated successfully, but these errors were encountered: