Configuring A/B test with cloudflare worker for http and https

https
workers

#1

Hey Guys,
I want to configure with Cloudflare worker a/b testing for HTTP protocol.

I want 50% of the traffic to be redirected to my site with HTTPS - 50% and with HTTP - 50%.

I searched the web and was unable to find a configuration for this.

I know how to configure A/B test with the worker its documented well but I wasn’t able to find a method for capturing the request and switching between HTTP and HTTPS.

I’m not so experienced with working with requests and responses.

any guidelines or examples will be great.
Thanks,


#2

Just would like to ask, why do you want this A/B tested? Every single mobile and desktop browser made within the last 5 years supports at least TLS 1.0, most 1.2/1.3. Based on the Google HTTPS Transparency report, both GMail and Google Drive have only loaded over HTTPS for the past 4 years.


#3

I own a site with high volumes of traffic and I’m using ad’s on my site.
some ad providers don’t work well with https and some do.
right now my site is http. and I want to move to https but I want to check if this change won’t hurt my income and the best way to check that is A/B testing.