Releases: vishalanandl177/DRF-API-Logger
Releases · vishalanandl177/DRF-API-Logger
API with or without Host
You can specify the endpoint of API should have an absolute URI or not by setting this variable in DRF settings.py file.
Set DRF_API_LOGGER_PATH_TYPE = 'ABSOLUTE' in settings.py
Possible values are ABSOLUTE, FULL_PATH, or RAW_URI.
Considering we are accessing the following URL: http://127.0.0.1:8000/api/v1/?page=123
DRF_API_LOGGER_PATH_TYPE possible values are:
-
ABSOLUTE (Default) :
Function used request.build_absolute_uri()
Output: http://127.0.0.1:8000/api/v1/?page=123 -
FULL_PATH
Function used request.get_full_path()
Output: /api/v1/?page=123 -
RAW_URI
Function used request.get_raw_uri()
Output: http://127.0.0.1:8000/api/v1/?page=123
Note: Similar to ABSOLUTE but skip allowed hosts protection, so may return insecure URI.
Stable Version - 0.0.6
TextField db_index removed, bleach version fixed