How to allow ip address or domain name visit Angular 4200 port and setup api proxy for same hosts name

ng serve --host 0.0.0.0 --disable-host-check --proxy-config=proxy.conf.json

proxy.conf.json:

{
  "/backend": {
    "target": "http://laravel-api.local",
    "secure": false,
    "logLevel": "debug",
    "changeOrigin": true,
    "pathRewrite": {
      "^/backend": ""
    }
  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *