Testing Your Proxy

EnvManager includes a built-in test panel that lets you send requests to your proxy function and inspect the response without leaving the browser.

Using the Test Panel

Open the Test Panel

On the proxy functions page, find the proxy you want to test. Click the play icon in the actions column to open the test panel. The panel slides in from the right side of the screen.

Review the Request Info

The panel displays the request details:

  • URL -- the hosted proxy endpoint
  • Method -- the HTTP method (GET, POST, PUT, or DELETE)
  • Required Headers -- the x-proxy-token header with your token value

Enter a Request Body (if needed)

For POST, PUT, and DELETE methods, a text area appears where you can enter a JSON request body. This is the data your frontend would normally send.

For example, if your proxy forwards email-sending requests to Brevo:

{
  "sender": { "name": "My App", "email": "noreply@myapp.com" },
  "to": [{ "email": "test@example.com" }],
  "subject": "Test Email",
  "htmlContent": "<p>Hello from my proxy!</p>"
}

Send the Request

Click Send Test Request. The panel sends the request to your hosted proxy endpoint with the correct token header.

Inspect the Response

The response section shows:

FieldDescription
StatusThe HTTP status code and text (e.g., 200 OK, 401 Unauthorized)
DurationHow long the request took in milliseconds
HeadersThe response headers from the third-party API
BodyThe response body (formatted as JSON if applicable)

Understanding Results

Successful Response

A 200 or 2xx status means your proxy is working correctly. The response body contains the data returned by the third-party API.

Common Errors

StatusLikely Cause
401 UnauthorizedThe secret variable value may be incorrect or expired. Check the variable value in your environment.
403 ForbiddenThe third-party API rejected the request. Check if the API key has the required permissions.
404 Not FoundThe target URL may be incorrect. Verify the endpoint in the proxy configuration.
422 Unprocessable EntityThe request body format may not match what the API expects. Check the API documentation.
500 Internal Server ErrorThe proxy encountered an error. This could be a misconfigured secret mapping or an issue with the target API.

CORS Errors

If you see a CORS error in your browser console when calling the proxy from your website (not from the test panel), check that your website's domain is listed in the Allowed Origins configuration. The test panel bypasses CORS since it sends requests directly from the server.

Testing with curl

You can also test your proxy from the command line. The proxy creation wizard shows a curl example after saving:

curl -X POST "https://your-supabase-url/functions/v1/proxy-handler/{proxy-id}" \
  -H "x-proxy-token: your-token-here" \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

Replace the placeholder values with your actual proxy URL, token, and request body.

Tips

  • Test with a minimal request body first to confirm the proxy connection works, then build up to the full request.
  • If the third-party API has a sandbox or test mode, use test credentials in your development environment.
  • After making changes to the proxy configuration (secret mappings, target URL, headers), test again to confirm everything still works.

Get DevOps tips in your inbox

Security best practices and product updates. No spam.

No spam. Unsubscribe anytime.