Arttu
Arttu

Reputation: 251

React app doesn't get API results after deploying to Heroku

I did basic movie database type app with React and then deployed it to Heroku. App contains input field and it returns results after pressing Enter, and this works just fine locally. My problem is when I deployed my app to Heroku nothing happens anymore when I hit Enter and trying to search something. I belive app works correctly but for some reason it doest't get data from API when app is deployed to Heroku. Any ideas what causing this problem and how to fix this?

Source code

Live demo

Upvotes: 0

Views: 503

Answers (1)

biscuit765
biscuit765

Reputation: 92

Mixed Content: The page at 'https://reactmoviedb.herokuapp.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.omdbapi.com/?apikey=bf410ecf&s=dfvdf'. This request has been blocked; the content must be served over HTTPS.

The error your are getting

ReactJS API Data Fetching CORS error

Upvotes: 1

Related Questions