It’s common for an Angular 4 project to use proxy during development to workround the same-orign policy, especially when the server-side is not developed using Node.js. If the Angular 4 project is created using Angular CLI, we can add a
proxy.conf.json file in the root directory to configure the proxy.
Then edit the
start script in
Add basic authentication header for requests to target server.
Add custom headers for requests to target server.