admin管理员组文章数量:1122826
I'm trying to set up a proxy in my Angular project to route specific API calls to a backend server. Here's the command I'm using to run the Angular application:
ng serve --proxy-config proxy.conf.json
Below is the content of my proxy.conf.json
file:
{
"/manifest.webmanifest": {
"target": "http://localhost:3090",
"secure": false
}
}
I expected requests to /manifest.webmanifest
to be proxied to http://localhost:3090
, but it doesn't seem to be working. When I make the request, the application still tries to fetch the resource from the default location instead of the proxy target.
- Verified that
proxy.conf.json
is in the root directory of the project. - Confirmed that the backend server on
http://localhost:3090
is running and reachable. - Tried clearing browser cache and restarting the Angular server.
I’m not sure if I’m missing something in the configuration or setup.
Additional Information:
- Angular CLI version: [Your Angular CLI version]
- Node.js version: [Your Node.js version]
Any help or guidance would be greatly appreciated!
本文标签: angularjsUnable to Add Proxy in Angular CLI for Custom ConfigurationStack Overflow
版权声明:本文标题:angularjs - Unable to Add Proxy in Angular CLI for Custom Configuration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736311113a1934621.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论