-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Preload generating CORS errors in console #1476
Comments
Fixed here #1459 (comment) and in 4e50e70 |
this seems to come back intermittently, any ideas?
|
I believe this could still occur if the preload nodes are down. @lgierth is still true? |
a scenario I've seen is when a service behind nginx, rather than nginx itself, generates the CORS headers, and that service goes down, we end up with nginx-generated messages without the right CORS (which then masks the underlying service failure) could that be happening here? |
By now nginx should be doing the CORS headers exclusively though, and go-ipfs shouldn't be setting them anymore. I'll double-check this tomorrow. |
@lgierth - do you mean just for this (preload) case, or for all cases. Because we've also got an open bug where go-ipfs running locally (on a laptop) is denying access to local browser. ipfs-inactive/js-ipfs-http-client#855 |
Just talking about the preload.ipfs.io and ipfs.io cases, but I'll check that /version issue out too |
Seconding this problem - no idea why this is happening, but I've tried several different methods (see: https://gist.github.com/patientplatypus/a4adc9d1ae69fa7b3c67843ae8bab935) and I keep getting CORS errors. My code was working prior and I didn't change anything. I think this is a bug. Here is the error:
I have allow origins * in my config, so I don't think it can be client side... |
Just confirming this preload/CORS issue is still happening. Although this might not be a CORS problem since its returning a "502 Bad Gateway" response, which (because it doesnt have cors headers) generates a cors error. |
This has been fixed (AFAIK). Let us know if not, closing for now. |
@diasdavid Can you point me to the tag or hash that has this fixed? I just tried 0.33.0-rc3 and it still exhibits all errors reported. 502 gateway, CORS and preload errors. I tried to run the latest RC because I woke up this morning unable to communicate to the IPFS network at all in my app. Seems none of the bootstrap nodes will allow proper communication due to these errors. |
I'm certainly still seeing this as well. |
@mitra42 I believe there were multiple hiccups on IPFS Infrastructure recently, but I'll let the @ipfs/infrastructure team confirm. If you see a CORS issue, it always means that the endpoint (in this case the go-ipfs node) doesn't have CORS enabled. CORS is a Browser protection but that gets set by the "server" part to avoid getting servers contacted from browsers on domains that are not whitelisted. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS explains CORS very well. |
@diasdavid - I'm familiar with CORS. CORS problems I've seen have been either "client" or "server" (Go-IPFS node) side, if the client didn't add the right "Origin" headers it can cause problems, or it could be the server not properly responding to that header. If its a server problem, as you suggest, then this issue should probably be re-opened, because as of yesterday some of your default preload servers don't have CORS enabled. |
@mitra42 I opened a issue on the IPFS Infrastructure, check progress here ipfs/infra#447 |
Type: Bug
Severity: unsure - probably
Description: preload is failing with CORS errors
Steps to reproduce the error:
I'm loading one of my existing demos, but am seeing repeated
I'm not intentionally preloading anything, but I noticed some messages about preloading pass by the lists recently, so I assume something changed.
The demo is broken, I don't think that's IPFS's fault, but it might be and given the closeness to the summit I thought someone might want to know.
The text was updated successfully, but these errors were encountered: