I have a local development website (e.g. http://localhost:2368) that is proxied through a Cloudflare Zero Trust tunnel (e.g. https://my-proxied-site.com). When I set up browsersync (proxy mode) to target the http://localhost:2368 site directly then everything works and the browser instances are registered with browsersync. However, when I set up browsersync (proxy mode) to target the Cloudflare proxied site at https://my-proxied-site.com then the browser instances fail to connect to browsersync. Upon inspection, I do not see the necessary browsersync scripts being injected into the site.
I have attempted to implement a bypass rule for all traffic to my-proxied-site.com to ensure that the Cloudflare gateway policies aren't blocking any connection attempts. However, this did not help.
Steps to reproduce/test case
See notes above.
Please specify which version of Browsersync, node and npm you're running
Browsersync [ 2.27.10 ]
Node [ 16.3.0 ]
Npm [ 8.1.0 ]
Affected platforms
[ ] linux
[x] windows
[ ] OS X
[ ] freebsd
[ ] solaris
[ ] other (please specify which)
Browsersync use-case
[ ] API
[x] Gulp
[ ] Grunt
[ ] CLI
If CLI, please paste the entire command below
None
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
import { create as createBrowserSync } from "browser-sync";
const browserSync = createBrowserSync();
browserSync.init({
proxy: {
target: "https://my-proxied-site.com", // THIS DOES NOT WORK
//target: "http://localhost:2368", // THIS WORKS
},
port: 8443,
open: false,
logLevel: "debug",
logConnections: true,
});
Issue details
I have a local development website (e.g.
http://localhost:2368
) that is proxied through a Cloudflare Zero Trust tunnel (e.g.https://my-proxied-site.com
). When I set up browsersync (proxy mode) to target thehttp://localhost:2368
site directly then everything works and the browser instances are registered with browsersync. However, when I set up browsersync (proxy mode) to target the Cloudflare proxied site athttps://my-proxied-site.com
then the browser instances fail to connect to browsersync. Upon inspection, I do not see the necessary browsersync scripts being injected into the site.I have attempted to implement a bypass rule for all traffic to
my-proxied-site.com
to ensure that the Cloudflare gateway policies aren't blocking any connection attempts. However, this did not help.Steps to reproduce/test case
See notes above.
Please specify which version of Browsersync, node and npm you're running
Affected platforms
Browsersync use-case
If CLI, please paste the entire command below
None
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync