Skip to content
Discussion options

You must be logged in to vote

Localhost traffic is tricky ? most browsers bypass the system proxy for localhost / 127.0.0.1 on purpose.

Workarounds:

  1. Hit your app via the machine name / LAN IP instead of localhost (e.g. http://192.168.x.x:4200).
  2. Chrome: launch with --proxy-server=127.0.0.1:8000 and use a hostname that isn't in the bypass list. You can also try http://local.mydomain mapped in hosts.
  3. Firefox: set network.proxy.allow_hijacking_localhost to true in about:config.
  4. Don't rely on SetAsSystemProxy alone for loopback ? configure the client explicitly.

Also make sure Angular/HttpClient isn't talking straight to the API without going through the browser proxy settings.

Closing ? reopen if a specific browser stil…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by justcoding121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants