Skip to content

Commit

Permalink
[DOP-22034] Use UUIDv8 for X-REQUEST-ID default value
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Dec 9, 2024
1 parent b4c1c00 commit 85d1ec8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data_rentgen/server/middlewares/request_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
from asgi_correlation_id import CorrelationIdMiddleware
from fastapi import FastAPI
from uuid6 import uuid7
from uuid6 import uuid8

from data_rentgen.server.settings.server import RequestIDSettings

Expand All @@ -14,7 +14,7 @@ def apply_request_id_middleware(app: FastAPI, settings: RequestIDSettings) -> Fa

app.add_middleware(
CorrelationIdMiddleware,
generator=lambda: uuid7().hex,
generator=lambda: uuid8().hex,
validator=None,
**settings.model_dump(exclude={"enabled"}),
)
Expand Down

0 comments on commit 85d1ec8

Please sign in to comment.