Proxy server for the Ionic app

Setting up a proxy server will take some time and it is only required if you want to run ionic serve and ionic run -l. We will see how Ionic CLI provides an easily configurable proxy server. Proxy server here will act as an intermediary for all the requests from client to server. It will take a client's request and issue a new request to the server and then on response from the server it will forward the response back to the client. Since the server is sending a new request to your destination, there will be no origin and therefore, no CORS needed. It is important to note that the browser adds in the origin header. For setting up proxy server we have to do the following mentioned changes:

  • Set up proxy in

Get Hybrid Mobile Development with Ionic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.