Charles modifies the host address of MapRemote

In front-end development, the proxy debugging tool Charles is often used to debug the interface. The specific functions and operations of Charles will not be repeated here. There are many related documents on the Internet.

 

Here will introduce what to do if the redirection address is wrongly written when using Charles to redirect, such as:

 

 

At this time, we need to use Charles' Rewrite function to rewrite the requested address.

The following are the specific steps to use:

First, click Rewrite in the Tloos panel:

Then the following interface will appear:

Next is the specific operation of Rewrite:

 

①Check Enable Rewrite, note here that this item must be checked;

②Add a new rewrite rule;

③ Give the newly added rewrite rule a name;

④ Specify the location that needs to be rewritten, the location and the request address with the same error, such as: ,

⑥ Add specific rewrite rules for the specified location. For example, if I filled in the wrong Host before, select Host in the type, and then fill in the original value and the value to be replaced (the specific rules depend on the situation):

 

After the specific rules are configured, click OK. At this time, it is found that the status code of the request that originally reported a 503 error has changed to 200, and the request has been successful.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324662992&siteId=291194637