diff options
| author | Bobby <[email protected]> | 2023-06-16 21:11:44 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2023-06-16 21:11:44 -0400 |
| commit | 7f37a45bb5dd80511ebad18e9f9c3a6f7d22d299 (patch) | |
| tree | 29482faf1de473e0cdedd9eb6a716ddfcd6f5b54 | |
| parent | 3f58ec2e918d6dcdc1213c58caec2d1691c81d3d (diff) | |
| download | thatcomputerscientist-7f37a45bb5dd80511ebad18e9f9c3a6f7d22d299.tar.xz thatcomputerscientist-7f37a45bb5dd80511ebad18e9f9c3a6f7d22d299.zip | |
Ingoring RSS in Middleware
| -rw-r--r-- | middleware/uuidmiddleware.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/middleware/uuidmiddleware.py b/middleware/uuidmiddleware.py index 97bdcb52..ec8cd765 100644 --- a/middleware/uuidmiddleware.py +++ b/middleware/uuidmiddleware.py @@ -21,6 +21,14 @@ class UserUUIDMiddleware: return self.get_response(request) def userTrackingContextProcessor(request): + # ignore /rss/ path + if request.path.includes('/rss/'): + return { + 'anonymous_users': 0, + 'logged_in_users': 0, + 'admin_users': 0, + } + # user tracking context processor - track 3 types of users (anonymous, logged in, admin) # based on the user's uuid cookie. Only UUID are necessary to track online users. Then we # separate them into anonymous, logged in, and admin users based on their permissions. |
