Package settings are added in your

Default settings are shown below:

    'GUID_HEADER_NAME': 'Correlation-ID',
    'VALIDATE_GUID': True,
    'RETURN_HEADER': True,
    'EXPOSE_HEADER': True,
    'UUID_LENGTH': 32,


  • Default: Correlation-ID
  • Type: string

The name of the GUID to look for in a header in an incoming request. Remember that it’s case insensitive.


  • Default: True
  • Type: boolean

Whether the GUID_HEADER_NAME should be validated or not. If the GUID sent to through the header is not a valid GUID (uuid.uuid4).


  • Default: True
  • Type: boolean

Whether to return the GUID (Correlation-ID) as a header in the response or not. It will have the same name as the GUID_HEADER_NAME setting.


  • Default: True
  • Type: boolean

Whether to return Access-Control-Expose-Headers for the GUID header if RETURN_HEADER is True, has no effect if RETURN_HEADER is False. This is allows the JavaScript Fetch API to access the header when CORS is enabled.


  • Default: []
  • Type: list

Whether to enable any custom or available integrations with django_guid. As an example, using SentryIntegration() as an integration would set Sentry’s transaction_id to match the GUID used by the middleware.


  • Default: []
  • Type: list

URL endpoints where the middleware will be disabled. You can put your health check endpoints here.


  • Default: 32
  • Type: int

If a full UUID hex is too long for you, this settings lets you specify the length you wish to use. The chance of collision in a UUID is so low, that most systems will get away with a lot fewer than 32 characters.