Cloudflare
Setting up Traffic Splitting with Cloudflare
Setup
To use Traffic Splitting with Cloudflare you will need to deploy a new Cloudflare Worker. This Worker will manage and direct traffic flow between Glopal Proxy and your service Origin.
Create a Worker
Log in to the Cloudflare dashboard and select your account.
Select Workers & Pages > Create application.
Select Create Worker > Deploy.
Create a rewrite rule
In your Cloudflare dashboard, find and click on the "Workers" app. Click on "Create a Worker". This will open the Workers editor where you can write and deploy your script - in the Workers editor, you'll find a pre-filled script. Delete it.
Copy the script and Paste it into the Workers editor.
Make sure to replace
GLOPAL_ENDPOINT
placeholder with the value you receive from Glopal and thatPATTERN
is a regular expression describing list of in-scope paths you want to delegate to Glopal.
Testing your rule
To ensure the rule works as expected, conduct a series of tests by visiting URLs that should be affected by the rule and confirming that they are rewritten correctly.
That's it! You have now created a URL rewrite rule in Cloudflare.
Last updated