update cloudflare context
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { requestIdContext } from '@/context'
|
||||
import { type LoaderFunctionArgs } from 'react-router'
|
||||
|
||||
import { requestIdContext } from '../context'
|
||||
|
||||
export const loggingMiddleware = async (
|
||||
{ request, context }: LoaderFunctionArgs,
|
||||
next
|
||||
) => {
|
||||
next: () => Promise<Response>
|
||||
): Promise<Response> => {
|
||||
const requestId = crypto.randomUUID()
|
||||
context.set(requestIdContext, requestId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user