-
Couldn't load subscription status.
- Fork 1.3k
Description
Currently, when a Webhook Form is submitted, the request is routed through a Cloudflare worker. This worker then calls the configured webhook URL from its own datacenter.
As a result, the destination server sees the Cloudflare worker's IP address, not the original user's IP. Client information from the original request, such as the IP address and User-Agent string, is lost. This prevents us from performing functions like geolocation, spam filtering and marketing analytics on form submissions.
Proposed Solution
When the Cloudflare worker processes the form submission and calls the webhook URL, it should forward the original client's request data using standard HTTP headers.
Specifically, the following headers should be added to the outgoing webhook call:
- X-Forwarded-For: The original client's IP address. This is the industry standard for identifying the originating IP of a client connecting through a proxy or load balancer.
- User-Agent: The original User-Agent string from the client's browser.
- Other relevant headers like Accept-Language could also be valuable.