From efcae146b45448cbbdfe13232f5c4d96efc50c7f Mon Sep 17 00:00:00 2001 From: usmannasir Date: Thu, 31 Oct 2024 08:43:21 +0400 Subject: [PATCH] release v2.3.8 --- CyberCP/secMiddleware.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CyberCP/secMiddleware.py b/CyberCP/secMiddleware.py index e491035f3..b7c63b05e 100755 --- a/CyberCP/secMiddleware.py +++ b/CyberCP/secMiddleware.py @@ -54,16 +54,22 @@ def __call__(self, request): pass from plogical.processUtilities import ProcessUtilities + FinalURL = request.build_absolute_uri().split('?')[0] - # if os.path.exists(ProcessUtilities.debugPath): - # logging.writeToFile(request.build_absolute_uri()) + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(request.build_absolute_uri()) + logging.writeToFile(FinalURL) + + + if FinalURL == '/' or FinalURL == '/verifyLogin' or FinalURL == '/logout': + if os.path.exists(ProcessUtilities.debugPath): + logging.writeToFile(request.build_absolute_uri()) - FinalURL = request.build_absolute_uri().split('?')[0] # if os.path.exists(ProcessUtilities.debugPath): # logging.writeToFile(f'Final actual URL without QS {FinalURL}') - if request.method == 'POST' or request.method == 'OPTIONS': + if request.method.lower() == 'post' or request.method.lower() == 'options': try: # logging.writeToFile(request.body)