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)