refactor(api): 统一将/story/路径修改为/api/story/
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
修改服务端API路径前缀以保持一致性,涉及前端请求、nginx配置和代理设置
This commit is contained in:
@@ -15,13 +15,13 @@ export default {
|
||||
// 如果需要自定义本地开发服务器 请取消注释按需调整
|
||||
dev: {
|
||||
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||
'/story/': {
|
||||
'/api/story/': {
|
||||
// 要代理的地址
|
||||
target: basePath,
|
||||
// 配置了这个可以从 http 代理到 https
|
||||
// 依赖 origin 的功能可能需要这个,比如 cookie
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/story': '/story' },
|
||||
pathRewrite: { '^/api/story': '/api/story' },
|
||||
},
|
||||
'/file/': {
|
||||
// 要代理的地址
|
||||
@@ -57,13 +57,13 @@ export default {
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
},
|
||||
'/story/': {
|
||||
'/api/story/': {
|
||||
// 要代理的地址
|
||||
target: 'http://localhost:30001',
|
||||
// 配置了这个可以从 http 代理到 https
|
||||
// 依赖 origin 的功能可能需要这个,比如 cookie
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^/story': '/story' },
|
||||
pathRewrite: { '^/api/story': '/api/story' },
|
||||
},
|
||||
},
|
||||
pre: {
|
||||
|
||||
Reference in New Issue
Block a user