Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70428

Ionic 4 proxies not working for Cors issue

$
0
0

@yassir-akhmis wrote:

I’m trying to fix fix the Cors issue using the proxies solution but it’s seems that my app doesn’t recognize the proxy.

here is my ionic.config.json :
{
“name”: “Allo Mealem”,
“integrations”: {
“cordova”: {},
“capacitor”: {}
},
“type”: “angular”,
“proxies”: [
{
“path”:"/api",
“proxyUrl”: “http://localhost:8000/api
}
]
}

And here is the post request that I’m sending to my backend :

login(emaill: string, passwordd: string) {

return this.http.post<any>(`/api/auth/login`,
  { email: emaill, password: passwordd}
);

}

and that’s the message I get in the console :
“Http failure response for http://localhost:8100/api/auth/login: 404 Not Found”

anyone knows how to fix this problem ?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>