Bower install fails with 502 - Bad Gateway when downloading bower packages.
For example bower install for ember library gives following response in command line.
When using asp.net core then should change something like this. bowerrc.json you can find inside project folder.
{ "registry": "https://registry.bower.io", "directory": "wwwroot/lib" }