File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,3 +47,4 @@ def ready(self):
4747 t .daemon = True # Make it a daemon so it shuts down with the main thread
4848 t .name = LOG_THREAD_NAME # Assign a name to the thread for easy identification
4949 t .start () # Start the background log insertion thread
50+ LOGGER_THREAD = t
Original file line number Diff line number Diff line change 1111
1212from drf_api_logger import API_LOGGER_SIGNAL
1313from drf_api_logger .apps import LOGGER_THREAD
14- # from drf_api_logger.start_logger_when_server_starts import LOGGER_THREAD
1514from drf_api_logger .utils import get_headers , get_client_ip , mask_sensitive_data
1615
1716
@@ -83,7 +82,8 @@ def __init__(self, get_response):
8382 def is_static_or_media_request (self , path ):
8483 static_url = getattr (settings , 'STATIC_URL' , '/static/' )
8584 media_url = getattr (settings , 'MEDIA_URL' , '/media/' )
86-
85+ if static_url == '/' or media_url == '/' :
86+ return False
8787 return path .startswith (static_url ) or path .startswith (media_url )
8888
8989 def __call__ (self , request ):
You can’t perform that action at this time.
0 commit comments