i use a proxy.config.json when running the dev server
"/api": {
"target": "http://localhost:8080",
"secure": false,
"loglevel": "debug",
"changeOrigin": true
},
"/login": {
"target": "http://localhost:8080",
"secure": false,
"loglevel": "debug",
"changeOrigin": true
}
but after the build i can't consume my rest api i tried to use the environement.ts but i got this error
Access to XMLHttpRequest at 'http://localhost:8080/login' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
any solution for that ( not on server side ) ?