CORS Error - Angular CORS error Resolved
HTML-код
- Опубликовано: 17 окт 2024
- #proxy #Angular #API #
Hello guys in this video im showing how to resolve CORS in angular while calling API.
dependency:
npm i express;
npm i cors;
npm i http-proxy-middleware;
I dont have environment so what can i do
hi thanks Balaji thanks for your video . I did it but when I served the angular app the 504 Gateway Timeout error
you first need to start proxy server. Open terminal/cmd in proxy dir. and type -> node index.js
Annoying "music" that is unneeded to show how to resolve the issue.
how to use in production side
we can't use this in prod. side and its not secure. When you deploy on same server it will not through CORS error