Black-Stories-Matter / black-stories-matter-fe

The goal of Black Stories Matter is to showcase a growing database of children's books by Black authors for educators, families, and youth.
MIT License
0 stars 1 forks source link

Access to fetch error on Heroku site #5

Closed laurenlucero closed 3 years ago

laurenlucero commented 3 years ago

Describe the bug When I open the app locally through Heroku or Netlify, I get two errors and cannot browse books.

Access to fetch at 'https://black-stories-matter-api.herokuapp.com/api/v1/books' from origin 'https://blackstoriesmatter.herokuapp.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:5000' that is not equal to the supplied origin. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

black-stories-matter-api.herokuapp.com/api/v1/books:1 Failed to load resource: net::ERR_FAILED

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://blackstoriesmatter.herokuapp.com/' or 'https://black-stories-matter.netlify.app/'
  2. Click on 'Browse Books'
  3. If books load, click to view
  4. If books do not load, see console error

Expected behavior Book data should be retrieved and displayed. Screen Shot 2020-10-19 at 3 12 58 PM

Screenshots Attached

Desktop (please complete the following information):

Smartphone (please complete the following information): Did not attempt

Additional context Two other users can access locally through this link

laurenlucero commented 3 years ago

Issue resolved!