Test URL Issues

I have n8n deployed in Kubernetes with separate main instance, workers, and webhook nodes. The main instance has N8N_DISABLE_PRODUCTION_MAIN_PROCESS=true set, and all workloads include the WEBHOOK_URL environment variable.

Problem: When users test workflows, the test webhook URL uses the editor base URL (main instance), which redirects through our WAF and auth policies. However, published workflows correctly use the webhook URL. This makes testing workflows impractical since test URLs should also point to the webhook endpoint, not the editor.

Question: How can I configure n8n so that test webhook URLs use the webhook URL instead of the editor base URL?

Hi @Ron_Ballesteros

You can’t. n8n does not support configuring test webhook URLs to use WEBHOOK_URL.

Explanation

Test webhooks are always generated from the editor (main instance) base URL by design and ignore WEBHOOK_URL. Only production (published) webhooks use WEBHOOK_URL. This behavior is expected and currently not configurable in distributed or Kubernetes setups.

Workaround

The recommended approaches are:

  • Allow /webhook-test/* through your WAF/auth layer for internal use, or
  • Test using the production webhook endpoint (secured with auth/headers), which correctly routes via WEBHOOK_URL.

Reference:

Thanks @tamy.santos for the quick reply. I also noticed forms workflows, the test url is /forms-test by default. I’m assuming we would have to allow that through the WAF as well? Or is there some default path I can set for all tests. I did see N8N_ENDPOINT_WEBHOOK_TEST but this looks like it only applies to webhooks.

@Ron_Ballesteros

Yes, that’s correct. Forms test URLs like /form-test and /forms-test must be allowed through the WAF. There is no default or global path configuration for all test endpoints in n8n.

According to the n8n documentation, test mode always runs via the Editor process, and test URLs are generated using the Editor base URL, not WEBHOOK_URL. The N8N_ENDPOINT_WEBHOOK_TEST variable only applies to Webhook nodes and allows changing the test path, not the domain. It does not apply to Forms.

So the expected behavior is that test URLs for both Webhooks and Forms use the Editor URL with paths like /webhook-test, /form-test, and /forms-test, while production URLs use WEBHOOK_URL.

At the moment, with my knowledge and n8n docs, the only supported approach is allowing the test paths through the WAF or testing via activated workflows using the production URL.

References:
Webhook common issues; Form Trigger params
Endpoints env vars
[Webhook workflow dev]
[Form Trigger node]

1 Like

Thanks again @tamy.santos …its quite unfortunate, but I see what we need to do…

hope everything goes well.