Improved handling of users without cookies #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Dan
Firstly excellent project, a simple non invasive add-on to any site!
Your USER_AGENT_BLACKLIST setting works for the well known search engines (that we know about and can add to the list) but I found a lot of "unknown" search engines and user agents with cookies disabled can really fill up your user table.
All we need to do is detect if the user agent accepts cookies and only then create the lazy user. Detection is normally a two step process but the session middleware already does the first step for us. We just need to check for the presence of the sessionid cookie. If its not there don't create the user.
The add-on is two lines in the decorator but is a huge plus.
Regards
Gert Steyn