Using snippet to rewrite host header

What is the name of the domain?

weichengcloudflare.uk

What is the issue you’re encountering

I want to rewrite host header so that AWS Load Balancer doesn’t reject my requests

What steps have you taken to resolve the issue?

I’ve tried to create a transform rule, but it didn’t allow me to rewrite host header.
Origin rule is enterprise only which we don’t have.
Can I use snippet to rewrite host header?

What are the steps to reproduce the issue?

N/A

No, the same rules applies. Only Enterprise plans can rewrite the host header.

While you cannot override host header for the original request, you can still fetch content from AWS LB using a fetch subrequest in Snippets. Feel free to use this example as a reference. This will work if your LB accepts requests for its own hostname (i.e. my-loadbalancer-1234567890.us-west-2.elb.amazonaws.com).

In the future, we’re considering adding load balancers to Cloud Connector to simplify this setup.

Thanks for the response, that possibly would work. Is there a plan to make snippets available to free accounts?
How do I request access to the alpha?

Could using Cloudflare loadbalancing also be an option?

All paid accounts already have access to Snippets in alpha, so if you are on a Pro plan or higher you should see it under the Rules tab of your dashboard. Currently there are no immediate plans to offer Snippets to free accounts.

Load Balancer allows to configure Host header for endpoints, however the Host header must either be a subdomain of a zone associated with this account, must match the endpoint address, or must publicly resolve to the endpoint address.