Proxy request

What is proxy request?

Proxy request allows you to reroute a network request to a different endpoint. For example, routing requests to example.com to localhost:8000. The browser will still treat the response as coming from example.com, though the request is actually sent to localhost:8000 instead.

Use cases

  • Rerouting production requests to localhost to test out changes on production domains
  • Test out third party scripts integration on production domain quickly and make sure that they are compliant with CSP and other domain restrictions.

Adding a proxy request

  • Click on the
    at the top and select Proxy request.
  • Enter the URL that you would like to be proxied.
  • In the Proxy URL text box, enter the URL that you would like to send the actual requests to.

Using Regex

  • If you would like to use regex for URL matching, click on the Regex button and enter the regex URL expression in the text field.
  • You can use Regex to capture strings from the matched URL and substitute it into the proxy URL.
    • For example, if you enter https://example.com/(.*) the in matching URL textbox, and http://localhots:8000/$1. Then a request to https://example.com/path?query=parameter will be routed to http://localhost:8000/path?query=parameter

Disable / enable proxy request

  • To disable a stub response action, simply uncheck the checkbox on the left side of the row.
  • To reenable, simply check the checkbox again.

Remove a proxy request

  • Simply click on the X button on the right side of the row to delete.