Kaynağa Gözat

feat: set proxy of backend api (#83)

tags/v0.1.0
balibabu 1 yıl önce
ebeveyn
işleme
a4e038310e
No account linked to committer's email address
2 değiştirilmiş dosya ile 8 ekleme ve 8 silme
  1. 7
    7
      web/.umirc.ts
  2. 1
    1
      web/src/utils/api.ts

+ 7
- 7
web/.umirc.ts Dosyayı Görüntüle

@@ -21,11 +21,11 @@ export default defineConfig({
hack: `true; @import "~@/less/variable.less";`,
},
},
// proxy: {
// '/v1': {
// 'target': 'http://54.80.112.79:9380/',
// 'changeOrigin': true,
// 'pathRewrite': { '^/v1': '/v1' },
// },
// },
proxy: {
'/v1': {
target: 'http://123.60.95.134:9380/',
changeOrigin: true,
// pathRewrite: { '^/v1': '/v1' },
},
},
});

+ 1
- 1
web/src/utils/api.ts Dosyayı Görüntüle

@@ -1,4 +1,4 @@
let api_host = `http://123.60.95.134:9380/v1`;
let api_host = `/v1`;
export { api_host };

Loading…
İptal
Kaydet