Ant-design-pro: How to change umi-request baseUrl?

Created on 15 Jan 2020  ·  2Comments  ·  Source: ant-design/ant-design-pro

How to change umi-request baseUrl?
Ex: https://github.com/axios/axios/issues/175

setting a proxy is for local, so it is not solution, I want to configure umi-request to make a call to different domain for prod environment and dont want to add all request to same url

🕵🏻‍♀️ question

Most helpful comment

you just do like this:

const request = extend({
   prefix: 'http://127.0.0.1:8080/erd',
  errorHandler, // 默认错误处理
  credentials: 'include', // 默认请求是否带上cookie
});

All 2 comments

you just do like this:

const request = extend({
   prefix: 'http://127.0.0.1:8080/erd',
  errorHandler, // 默认错误处理
  credentials: 'include', // 默认请求是否带上cookie
});

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhuanglong picture zhuanglong  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments

skyFi picture skyFi  ·  3Comments

cheung1111 picture cheung1111  ·  3Comments

lvzheng0404 picture lvzheng0404  ·  3Comments