Cross-Origin Request Blocked with React and Express

前端 未结 4 1192
长情又很酷
长情又很酷 2021-01-12 15:54

So I hit this error, when I was trying to send data to the back end using React. From what I learnt I need to allow the communication on the back-end and in the .htacc

4条回答
  •  走了就别回头了
    2021-01-12 16:05

    One reason might be you're using the route as localhost:8000 rather than http://localhost:8000.

    USE

    http://localhost:8000
    

    DON'T USE

    localhost:8000
    

提交回复
热议问题