Open KerolosYoussef opened 1 year ago
You cannot call the service directly You can use SSR
By port 4200 I guess you are using Angular :D you can set up a proxy in Angular so that you won't get CORS errors and still contact the API.
By port 4200 I guess you are using Angular :D you can set up a proxy in Angular so that you won't get CORS errors and still contact the API.
Yeah i'm using angular. I have tried to use proxy but it didn't work idk why
Hey @KerolosYoussef , you try develop a Api, in my Youtube channel I share a video, where I explain a Api rest with Nestjs: https://youtu.be/kc3VurqhiZw
'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Hello, I got this error message and i think you didn't enable the CORS in your server.