Can't make request to backend from static frontend

I am re writing the /api request but still, its making the request on frontend URL.


That should work if the rewrite destinations are valid.

Could you share the whole /api/* rewrite destination?


also it is working fine if I am running the frontend code from localhost

There will always be differences between environments: development mode/Local, production mode/Render, etc. These differences need to be considered and configured as required for your own app in each environment.

Please could you share the whole /api/* rewrite “destination”? It’s not complete in your screenshot.

this is the rewrite destination , I already shared

Ok, then that would be likely be incorrect.

If you want to pass the static site /api/* to then you need to pass the wildcard on.

E.g. the destination may be something like*


I tried that too. But still tried now, its not working

Again, please share what you’ve got set.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.