redux-book / code-samples

Code samples from The Complete Redux Book
94 stars 31 forks source link

No 'Access-Control-Allow-Origin' #3

Closed nicubarbaros closed 7 years ago

nicubarbaros commented 7 years ago

The book is great so far, however, I would love to come on Github and see the final code for the project as it was in the books. So I am getting a CORS error at first application Error:

Fetch API cannot load https://s3.amazonaws.com/500tech-shared/db.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I added {mode: 'cors} but still the error persists.

radi-cho commented 7 years ago

@nicubarbaros Hello! Maybe I can to help you, but I don't understand that error at all... Please send something like "piece" of your code and any more details :smile: :smile: :smile:

borisd commented 7 years ago

Hi, should be solved in latest version (now using local json file instead of real network access)

radi-cho commented 7 years ago

Thanks @borisd