Proxied dns ends sessions

Hi,
i have a website done in aspx (not by me) that im hosting where we have an issue with the cf proxy function, im not sure how to correct or find out whats causing this, if its cf thats interpeting the site wrong or if it’s just how the site is built.

i added a second subdomain name for it that does not use the cf proxy and that works out fine.

the issue is that im getting sent back to the login screen at randoms.

would anyone care to help me with this?
i could do a log-collection with ff-profiler or har dump.

Hi @RikardB

Can you share an URL ad tell more about the issue you are facing?

Hi, atm the sites are disbaled for proxy, as its live systems i can’t give out any login for it.
I can however setup a mock up site and database and provide login for CF to test the site your self.

Hello,

Can you try to enable the proxy again and then enable “development” mode? After this does it work as intended? As this feature disables caching among other features.

If that resolves the issue it may be that you need to configure a cache rule to not cache the login page URI. Which can be down with the documentation below.

2 Likes

So development mode did nothing,
I also thought it was caching issues and added a rule (hopefully right) but that didn’t help then.
Either way, development mode did not do anything.

You can still test your requests against Cloudflare edge even if you’re not orange-clouded in production.

  1. Forcing your request to go through assigned Cloudflare IPs should still work:
curl -svo /dev/null https://yoursite.com --connect-to ::1.2.3.4

(where yoursite.com is the domain that exists in your Cloudflare account and 1.2.3.4 is the Cloudflare IP address that any orange-clouded record within this Cloudflare zone resolves to; you can also do the same via modifying your /etc/hosts file locally to override DNS)

  1. Running Cloudflare Trace on a non-proxied record will still return all the configurations that Cloudflare would have applied to this request: Trace a request with Cloudflare Trace (beta) · Cloudflare Fundamentals docs.

Thanks, but i am unsure how and what this will help me with, i am not that deeply skilled in this.
i know what curl is but browsing around on the web-site i host i randomly get kicked out/logged out, i just assume it has something to do with the sessions that gets tangled up and the site determines the sessions as untrusted and ends it.

especially when its just random and not a specific link on the site.

Usually when an issue is appearing at random and there isn’t a good theory on why it is happening, the next step is to start checking all things involved one by one. In this case I would suggest to override your DNS locally to point to Cloudflare so that your production environment is not affected, then open Dev Tools in your browser in Incognito mode and try reproducing the issue from scratch.

Once the issue is reproduced and you’ve been logged out, review Console log in Dev Tools for any error message that might be related to the issue. It can be a specific request that needs a special header, for example Cross-Origin Resource Sharing (CORS), or some logic in the code of your web application that requires a specific cookie or session token that is not passed for various reasons, i.e. due to caching.

After that, especially if you didn’t find anything relevant in the Console log, review Network tab to see if any requests errored out or weren’t sent at all by your browser.

This should help to pinpoint at which stage of your session the logout event is happening and which request / event potentially triggers it.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.