Skip to content

Occasionally get "Connection lost. Trying to reconnect..." with Cloudflare authentication #3664

Closed Answered by valankar
valankar asked this question in Q&A
Discussion options

You must be logged in to vote

Just to follow up, I finally figured out what the issue was here. Looking at:

if not request.url.path.startswith('/_nicegui') and request.url.path not in unrestricted_page_routes:

I saw that /_nicegui is bypassed in the authentication example. I had to set this up similarly in Cloudflare Zero Trust.

This link explains how to create a bypass policy:

https://developers.cloudflare.com/cloudflare-one/policies/access/#bypass

You need to create an 'application' to bypass a certain subpath for auth. Some more info on policy inheritance and subpaths:

https://developers.cloudflare.com/cloudflare-one/policies/access/app-pa…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@valankar
Comment options

@valankar
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by valankar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants