It's a handy tool to map a matched requests to local files on a selected Directory. If the local files doesn't exist, it will serve from the real server.
If you would like to map a Local File, let check out the Map Local (File) page
{% content-ref url="map-local.md" %} map-local.md {% endcontent-ref %}
api.proxyman.io/build/v1/*
=> All sub-paths after /v1/
will map to a selected directory.
For instance, we select ~/desktop/my_folder
as the local directory
Real URL | Resolved Local Path |
---|---|
http://api.proxyman.io/build/v1/index.html | ~/desktop/my_folder/index.html |
http://api.proxyman.io/build/v1/js/main.js | ~/desktop/my_folder/js/main.js |
Rule | How to use | Examples |
---|---|---|
Wildcard |
|
|
Regex |
|
{% hint style="info" %}
Make sure you use ()
group Regex operator to tell Proxyman where to map
{% endhint %}
api.proxyman.io/*
=> All sub-paths will map to a selected directory.
For instance, we select ~/desktop/my_folder
as the local directory
Real URL | Resolved Local Path |
---|---|
http://api.proxyman.io/build/v1/index.html | ~/desktop/my_folder/build/v1/index.html |
http://api.proxyman.io/build/v1/js/main.js | ~/desktop/my_folder/build/v1/js/main.js |
Rule | How to use | Examples |
---|---|---|
Wildcard |
|
|
Regex |
|
If you would like to do Map Local Directory with complicated rules, you might check out Scripting since it's easier to achieve the same result.
Please check out our Snippet Code to understand how to map a local file with Javascript Code.