DEV Community

Discussion on: Deploying an i18n Angular app with angular-cli

Collapse
 
mkubdev profile image
Maxime Kubik • Edited

Hi

Nice one, but what if i want to reverse_proxy my API calls ? I mean, on the /fr/ version, my api call is translated to /fr/api/ instead of /api/, how can i handle this with nginx ?

Before i18n, my rule was :

location /api/ { 
 proxy_pass http://myapi.fr;
}
Enter fullscreen mode Exit fullscreen mode

So i get no items from my api since the basehref is added before the request