angular - 通过 ng build 构建代码后代理配置不起作用
问题描述
代理配置在本地环境中运行良好
"/api/*": {
"target": "http://10.71.9.82:8080",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {"^/api" : ""}
}
但是在 tomcat 中构建和部署 dist 文件夹后,它不起作用如何为代理配置 tomcat?
解决方案
推荐阅读
- python - 当我尝试使用 python networkx 总结文本文档时出现错误“功率迭代未能在 100 次迭代内收敛”)
- apache-kafka - 在同一 Kafka 流应用程序中重用 KStream 对象以跨多个时间窗口查找计数
- javascript - React JSX 传播属性如何在幕后工作?
- html - 设置其他元素的浮动左侧后,位置粘性不起作用
- rust - Rust 中有 ++ 和 -- 运算符吗?
- java - 我能知道为什么我的汇总结果不起作用吗
- html - 如何水平显示图像及其标题
- python - 从列表中查找值的索引到不同的列表
- html - 如何获得正确的位置
- reactjs - React - 使用反应钩子,在 useEffect 中设置数组状态并观察它导致无限循环?