欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 美景 > vue中proxy代理配置(测试二)

vue中proxy代理配置(测试二)

2025/2/24 10:28:12 来源:https://blog.csdn.net/k0933/article/details/144701034  浏览:    关键词:vue中proxy代理配置(测试二)

接口地址:https://ss.dd.dd.d.cn:9006/thirdist/portalApi/biz-api/eemp/supervision/v1//getPeiCountData?batch=2&cent=0
1、配置一(代理没起作用)
(1)设置baseURL为https://ss.dd.dd.d.cn:9006
(2)proxy为 ‘/api’:’ ’
(3)请求get(‘/api/thirdist/portalApi/…’)

在这里插入图片描述

2、配置二(代理没起作用)
(1)设置baseURL为 https://ss.dd.dd.d.cn:9006
(2)proxy为 ‘/api’:’ /api’
(3)请求get(‘/thirdist/portalApi/…’)
在这里插入图片描述

3、配置三(200)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/api’:’ ’
(3)请求get(‘/api/thirdist/portalApi/…’)
在这里插入图片描述

4、配置四(404)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/api’:’ /api’
(3)请求get(‘/api/thirdist/portalApi/…’)

在这里插入图片描述

5、配置五(200)
(1)设置baseURL为 ‘/’
(2)proxy为 ‘/posts’:’ /thirdist
(3)请求get('/thirdist/portalApi/…)
在这里插入图片描述

代理标识:‘/api/idaas/’
开发:http://localhost:3000/api/idaas/protocol/pagepageIndex
正式:http://90.34.56.12:8000/api/idaas/protocol/pagepageIndex

vue中proxy代理配置(测试一)

devServer.proxy不生效问题解决

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词