Zeka Posted June 10, 2018 Share Posted June 10, 2018 I have moved my local development domain from .local to .localhost and after this, I'm logged out from admin every time I visit the front of the site. I have tested it on several installations. On .local domain I've used ' $config->sessionFingerprint = 2; '. But on .localhost I have to change it to ' $config->sessionFingerprint = 0;' to solve the issue, but I can't understand why it worked on .local domain, but doesn't on .locahost. Do you have any idea what can cause it? Thanks, Eugene. Link to comment Share on other sites More sharing options...
dragan Posted June 10, 2018 Share Posted June 10, 2018 I don't know either, since I never used .local. But try to add localhost or 127.0.0.1 to your site/config.php file in the "allowed hosts" array. And maybe also delete everything that's inside site/assets/cache and reload everything. 2 Link to comment Share on other sites More sharing options...
bernhard Posted June 11, 2018 Share Posted June 11, 2018 On 6/10/2018 at 1:10 PM, dragan said: I don't know either, since I never used .local. But try to add localhost or 127.0.0.1 to your site/config.php file in the "allowed hosts" array. And maybe also delete everything that's inside site/assets/cache and reload everything. Jep, and try it in a private window - maybe you have some old session cookies or browser cache / redirects that mess things up. 1 Link to comment Share on other sites More sharing options...
Doug G Posted June 13, 2018 Share Posted June 13, 2018 .local is a special case top level domain. My guess is your change messed up some dns resolution somewhere. And I wouldn't use a tld of .localhost either, since localhost is a widely-used alias for 127.0.0.1 and is usually defined in a computer hosts file and may cause other unexpected confusion. https://en.wikipedia.org/wiki/.local 1 Link to comment Share on other sites More sharing options...
Zeka Posted June 13, 2018 Author Share Posted June 13, 2018 @dragan, @bernhard, @Doug G Thanks for answers. Flushing of DNS records helped and now it works with $config->sessionFingerprint = 2; As for .localhost - I have chosen it as it was reserved for local testing and dev scenarios. Is there better domain name for local development? 1 Link to comment Share on other sites More sharing options...
szabesz Posted June 13, 2018 Share Posted June 13, 2018 1 hour ago, Zeka said: Is there better domain name for local development? .test https://webdevstudios.com/2017/12/12/google-chrome-63/ https://en.wikipedia.org/wiki/Top-level_domain "RFC 6761 reserves the following four top-level domain names to avoid confusion and conflict.[18] Any such reserved usage of those TLDs should not occur in production networks that utilize the global domain name system: example: reserved for use in examples invalid: reserved for use in obviously invalid domain names localhost: reserved to avoid conflict with the traditional use of localhost as a hostname test: reserved for use in tests" 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now