You can access APIs blocked by CORS restriction by using either Proxyscotch or custom middleware. You can also use the Hoppscotch web extension to intercept requests and responses.

Proxy

  • Enable proxy from ”Settings page”.
  • You can replace the Proxy URL with your proxy middleware if you wish.

Middleware

Since CORS is as simple as adding some HTTP headers, it’s the only browser blocked. You can build some proxy-like component that will make a call for you and get the response from the desired API. You add it to the headers and then send it back to Hoppscotch.

Browser extension

  1. Install the browser extension from the below links:

  2. Click on the Hoppscotch Browser Extension icon from the browser toolbar and add a new origin as http://localhost or http://localhost:8000 as per your local server configuration.

  3. Refresh the Hoppscotch web app.

  4. Open the interceptor and change the middleware to the browser extension

    You can either go to the settings and enable the use of the browser extension as shown below:

    Or you can open the interceptor menu and change the middleware as shown below: