Can’t login to an application - Cloudflare Access

Hi, so I have created an application for eve-ng so I could access it via the apps launcher. The steps I did to create it are as followed:

  • I’ve created a group that contains my mail to attach it to policies.
  • I’ve created an App Launcher rule with the same group that contains my mail attached to allow me access to the App Launcher page.
  • I have created a tunnel called eve-ng which routes the IP of the machine that eve-ng sits on as well as a public hostname of my domain with a subdomain that is to be used when accessing the application from the App Launcher (on port 80).
  • I have set the tunnel mode to split tunnel and added the IP of the machine with eve-ng so that any traffic to that destination IP will get sent through the tunnel.
  • And lastly, I have created the eve-ng application with a self-hosted type, set an allow policy with the group I created earlier attached (so I could see and access the app on the App Launcher), and pointed the application domain to the same subdomain that I have set in the tunnel settings (there is a CNAME record for that subdomain pointing towards the tunnel url).

At this stage I can open the App Launcher and see the app, I click it and I can see the login page for eve-ng but that’s when the problem happens. When I login it just does nothing. I see the request being sent to an endpoint that is slightly different from the one I send when connecting to the IP of the machine directly and logging in (which works). I suspect that the referrer header might be related but I am not too sure at all.I also think that the 401 http error might be related as it relates to the endpoint that is used to login normally. I would appreciate any help in resolving this so I could login from the App Launcher as well.
If there is a need for other images as well as any information I will gladly provide.

PS: I will attach images below.



Am not sure if this is related to my problem, I can not even open the website
https://beshoo.com

it dos not even load or responded.!

do you think it is same problem?

Hi, you are not providing much information so I can’t tell. However, my situation have the website showing up so it doesn’t look like your problem is the same as mine.

I’ve run into this exact same issue. I think I identified the culprit on my end, but I’ll still need to troubleshoot to get it completely working.

When you make a request to your Cloudflare Tunnels endpoint, can you look at the request in DevTools and see if it’s including the status text? For me, the Status Code field says 200 OK when I access EVE-NG locally. (192.168.x.x) However, when I access EVE-NG through Cloudflare Tunnels, it only says 200.

If you look at the source code for the EVE-NG web app, you’ll see lines like if (response.status == '200' && response.statusText == 'OK'). So because Cloudflare isn’t including the statusText portion of the response, this causes the login and logout functions to fail.

Let me know if you also have the same symptoms. I modified the app’s source code to remove references to response.statusText and that seems to get things working. However, I’m not sure what those modifications might break. The correct answer would be to fix Tunnels so it properly responds with the statusText portion. That’s what I’ll have to troubleshoot some more.