I can confirm that I can get data from http://localhost:5000/api/products, but in the project, the request returns a 426 error. I tried requesting other APIs and can get data, or if I directly use axios.get('http://localhost:5000/api/products')
, I can also get data. However, when I configure the proxy and request /api/products
, I encounter the 426 problem. How can I solve this? It has been bothering me for a long time, and I can’t figure it out.
Rookie Van is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.