When developing vue, the interface server restricts the request ip. How to operate the front end can test the API? locally.

problem description:
the api.xx.com interface can only be accessed through the ip of 40.70.230.110ip 3499, and the api.xx.com is not hung on the 40.70.230.110api.xx.com 3499.
attempted
1 api.xx.com cannot be accessed locally without a vpn agent (ip restriction)
2. If proxyTable, is set locally, it will still report an error.
3. The error is still reported after configuring host as 0.70.230.110.
where vpn (agent local to 40.70.230.110ambigu3499)

clipboard.png.
I would like to ask all the bosses to give us some advice on how to deal with this problem.

Mar.07,2021

found the solution by himself.
after this configuration, you can request online addresses locally without cross-domain problems.

solution:
Cross-domain problem
1 Local host is configured as an online domain name:
Note that localhost does not support port mapping.
clipboard.png
2.axios

clipboard.png
ip restrictions
ip restrictions are requested locally through the vpn proxy. For example, if he restricts the access of 40.70.230.110br 3499, you need to configure the server to this 40.70.230.110br 3499. Do it yourself, Baidu.
3 . Visit m.xx.com directly when accessing locally

Menu