Closed AnaflaviaDiaz closed 5 years ago
Hello @AnaflaviaDiaz! if you're in development then you can use a proxy to test withng serve --proxy-config proxy.conf.json
.
@lula angular proxy only works when you do ng serve
, if you build by ng build
you can't set proxy, and CORS issue happens
Yes, that's normal. CORS issues have nothing to do with this lib. You have to have your client whitelisted in the server, or use some reverse proxy.
@lula thanks for fast response, the server white listed the client and urls and methods, the issue is I don't see any preflight request (OPTION) being send, which usually should be done automatically by browser
@RezaRahmati you're welcome :). I don't think the preflight request is automatically done by the browser, I believe you should do it yourself as you need to add headers to the (second) request.
@lula OK, anyway preflight request are sent by browser see https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request paragraph 3
How can I fix this problem with CORS?