Timeout issues with peer tube site behind cloud flare proxy

It seems like the videos on my site have a hard time playing. They time out when you press the play button but they sometimes play correctly when you reload the page.

I’m trying to figure out if this is related to having the domain behind a cloud flare proxy. I know the free account on cloud flare only allows HTTP proxying but as far as I know (and maybe that’s where I’m going wrong) if I’m not enabling downloads or live streaming then peer tube should only use HTTP?

Looking at the Safari console I get a fragLoadTimeout error and then a lost web socket connection to wss://mytube.malenfant.net/tracker/socket.

Should a cloud flare proxy work with video playing on peer tube or am I chasing something that’s not possible?

Thanks in advance.

Hello,

I think your cloudflare proxy doesn’t correclty respond to byte range requests. Please see Some videos not playing properly in some geographical regions · Issue #6313 · Chocobozzz/PeerTube · GitHub that can help

Thank you for the reply and for the help.

I followed the link down thru a couple of different threads and it seems like the suggested fix is a setting for Browser Cache TTL → Respect existing headers. Is that what you meant?

I tried that and it didn’t seem to so anything in my case even after waiting for the change to propagate.

Turing off the caching altogether does the trick though (by adding a page rule for my site and setting Cache Level to Bypass). I wonder if there is a better solution.

@Chocobozzz

I’m sorry I don’t know Cloudflare so I can’t help regarding its configuration.